Commit Graph

357388 Commits

Author SHA1 Message Date
Valeriy Savchenko 35dd0147cd [analyzer] CmpRuns.py: Decouple main functionality from argparse
Summary:
It makes it much harder to use from other modules when one of the
parameters is an argparse Namespace.  This commit makes it easier
to use CmpRuns programmatically.

Differential Revision: https://reviews.llvm.org/D81566
2020-06-16 13:30:01 +03:00
Valeriy Savchenko 4a7b3d406f [analyzer] SATestAdd.py: Parse arguments with argparse
Differential Revision: https://reviews.llvm.org/D81565
2020-06-16 13:30:00 +03:00
Valeriy Savchenko bbb8f17136 [analyzer] SATest: Add posibility to download source from git and zip
Differential Revision: https://reviews.llvm.org/D81564
2020-06-16 13:30:00 +03:00
Valeriy Savchenko fb4b565212 [analyzer] SATest: Move from csv to json project maps
Summary:
JSON format is a bit more verbose and easier to reason about
and extend.  For this reason, before extending SATestBuild
functionality it is better to refactor the part of how we
configure the whole system.

Differential Revision: https://reviews.llvm.org/D81563
2020-06-16 13:30:00 +03:00
Valeriy Savchenko 4a606e0a8c [analyzer] CmpRuns.py: Fix error due to statistics differences
Differential Revision: https://reviews.llvm.org/D81642
2020-06-16 13:30:00 +03:00
Valeriy Savchenko 98f737f4bf [analyzer] CmpRuns.py: Refactor and add type annotations. NFC.
Differential Revision: https://reviews.llvm.org/D80517
2020-06-16 13:29:46 +03:00
LLVM GN Syncbot 2176af3428 [gn build] Port b7084d8ede 2020-06-16 10:13:47 +00:00
Haojian Wu 28923dc2dd [AST][RecoveryExpr] Fix a crash on a field decl with invalid type.
Summary:
The field decl (in the testcase) was still valid, which results in a
valid RecordDecl, it led to crash when performing struct layout,
and computing struct size etc.

Reviewers: sammccall

Subscribers: cfe-commits

Tags: #clang

Differential Revision: https://reviews.llvm.org/D81913
2020-06-16 12:12:10 +02:00
Dineshkumar Bhaskaran b7084d8ede [ELF] Fixing an issue in Elf_Note_Impl::getDescAsStringRef
Summary:
Fix in getDescAsStringRef to not use a reference to a
temporary type and added a testcase.

Reviewers: arsenm, saiislam, scott.linder

Reviewed By: scott.linder

Subscribers: wdng, mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81653
2020-06-16 10:08:31 +00:00
Jay Foad 6fdd5a28b7 Revert "[IR] Clean up dead instructions after simplifying a conditional branch"
This reverts commit 69bdfb075b.

Reverting to investigate https://bugs.llvm.org/show_bug.cgi?id=46343
2020-06-16 10:32:15 +01:00
sstefan1 73bfb4fd52 [OpenMPOpt] initial tests for ICV tracking. Only nthreads is used.
Summary: Couple of tests to showcase what will be done and what to expect with ICV tracking.

Reviewers: jdoerfert, JonChesterfield

Subscribers: yaxunl, guansong, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81114
2020-06-16 11:29:42 +02:00
Vitaly Buka 6b4aeec94a [asan] Unpoison signal alternate stack.
Summary:
Before unwinding the stack, `__asan_handle_no_return` is supposed to
unpoison the entire stack - that is, remove the entries in the shadow
memory corresponding to stack (e.g. redzone markers around variables).
This does not work correctly if `__asan_handle_no_return` is called from
the alternate stack used in signal handlers, because the stack top is
read from a cache, which yields the default stack top instead of the
signal alternate stack top.

It is also possible to jump between the default stack and the signal
alternate stack. Therefore, __asan_handle_no_return needs to unpoison
both.

Reviewers: vitalybuka, kubamracek, kcc, eugenis

Reviewed By: vitalybuka

Subscribers: phosek, #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D76986
2020-06-16 02:28:38 -07:00
Andi-Bogdan Postelnicu 068fa35746 [clang-tidy] For `run-clang-tidy.py` escape the paths that are used for analysis.
Some paths can have special chars like `file++c.cpp` in this case the regex will
fail if we don't escape it.
2020-06-16 12:21:18 +03:00
Simon Pilgrim 379c5b31f7 [X86][SSE] combineVectorSizedSetCCEquality - remove unused AVX2 MOVMSK path. NFCI.
If PTEST is not available, then we're guaranteed to be performing a 128-bit vector comparison using MOVMSK(PCMPEQB(v16i8)).
2020-06-16 10:07:41 +01:00
Kadir Cetinkaya 3725142449
[clangd] Make sure working directory is set during preamble validation 2020-06-16 11:06:41 +02:00
Kirill Bobyrev 9b72b47ed6 Revert "[mlir][Linalg] Retire C++ MatmulOp in favor of a linalg-ods-gen'd op."
This reverts commit 8c6c49f293.

As discussed offline, this patch breaks internal builds and tests so I'm
reverting it for now.
2020-06-16 11:02:28 +02:00
Hans Wennborg bd779e2c49 [gn build] (manualy) merge e2cc854 2020-06-16 10:58:07 +02:00
Robert Schneider 387e94ca92 [asan] Refactor stack unpoisoning.
Summary: This adds a customization point to support unpoisoning of signal alternate stacks on POSIX.

Reviewers: vitalybuka

Reviewed By: vitalybuka

Subscribers: #sanitizers

Tags: #sanitizers

Differential Revision: https://reviews.llvm.org/D81577
2020-06-16 01:52:44 -07:00
Igor Kudrin ffc5d98d2c [MC] Generate .debug_frame in the 64-bit DWARF format [7/7]
Note that .eh_frame sections are generated in the 32-bit format even
when debug sections are 64-bit, for compatibility reasons. They use
relative references between entries, so they hardly benefit from the
64-bit format.

Differential Revision: https://reviews.llvm.org/D81149
2020-06-16 15:50:14 +07:00
Igor Kudrin 1e081342d4 [MC] Fix DWARF forms for 64-bit DWARFv3 files [6/7]
DW_FORM_sec_offset was introduced in DWARFv4, so, for 64-bit DWARFv3,
DW_FORM_data8 should be used instead.

Differential Revision: https://reviews.llvm.org/D81148
2020-06-16 15:50:14 +07:00
Igor Kudrin ab7458fb04 [MC] Generate .debug_rnglists in the 64-bit DWARF format [5/7]
In addition, the patch fixes referencing the section within
a compilation unit.

Differential Revision: https://reviews.llvm.org/D81147
2020-06-16 15:50:13 +07:00
Igor Kudrin b5f8959bcd [MC] Generate .debug_aranges in the 64-bit DWARF format [4/7]
Differential Revision: https://reviews.llvm.org/D81146
2020-06-16 15:50:13 +07:00
Igor Kudrin 1dfcce5395 [MC] Generate a compilation unit in the 64-bit DWARF format [3/7]
The patch enables producing DWARF64 compilation units and fixes
generating references to .debug_abbrev and .debug_line sections.
A similar change for .debug_ranges/.debug_rnglists will be added
in a forthcoming patch.

Differential Revision: https://reviews.llvm.org/D81145
2020-06-16 15:50:13 +07:00
Igor Kudrin 64c049595b [MC] Generate .debug_line in the 64-bit DWARF format [2/7]
Differential Revision: https://reviews.llvm.org/D81144
2020-06-16 15:50:13 +07:00
Igor Kudrin a8ec9de406 [MC] Add --dwarf64 to generate DWARF64 debug info [1/7]
The patch adds an option `--dwarf64` to instruct a tool to generate
debug information in the 64-bit DWARF format. There is no real
implementation yet, only a few compatibility checks.

Differential Revision: https://reviews.llvm.org/D81143
2020-06-16 15:50:13 +07:00
Simon Pilgrim 057c9c7ee0 [X86][SSE] MatchVectorAllZeroTest - handle OR vector reductions
This patch extends MatchVectorAllZeroTest to handle OR vector reduction patterns where the result is compared against zero.

Fixes PR45378

Differential Revision: https://reviews.llvm.org/D81547
2020-06-16 09:42:34 +01:00
Simon Pilgrim 65c3fa849b [X86][SSE] combineVectorSizedSetCCEquality - move single Subtarget.hasAVX() use into condition. NFC.
We already have Subtarget.hasSSE2() and Subtarget.useAVX512Regs() in the condition - seems to be a legacy from when we had multiple uses.
2020-06-16 09:42:33 +01:00
Uday Bondhugula 7965dd79a3 [MLIR] Fix memref region compute for 0-d memref accesses
Fix memref region compute for 0-d memref accesses in certain cases (when
there are loops surrounding such 0-d accesses).

Differential Revision: https://reviews.llvm.org/D81792
2020-06-16 13:59:53 +05:30
Haojian Wu e00dcf61a2 NFC: cleanup the "(void)" case trick since the assertion is wrapped in NDEBUG. 2020-06-16 09:46:29 +02:00
Sam Parker 7158f285a8 [CostModel] Unify getCFInstrCost
Have TTI::getInstructionThroughput call getUserCost for Br, Ret and
PHI. This now means that eveything in getInstructionThroughput is
handled by getUserCost.

Differential Revision: https://reviews.llvm.org/D79849
2020-06-16 08:40:54 +01:00
Kirill Bobyrev 45e4c9d70c
NFC: Inline unused variable
The variable was not used anywhere except assert and causes build
warnings in the optimized builds.

Clanup after 913bc312b5
2020-06-16 08:29:52 +02:00
Siva Chandra Reddy 6fb7f3a3cf [lib][NFC] Split the floating point util functions into multiple files.
The grouping now reflects the grouping on cppreference.com.
2020-06-15 23:12:00 -07:00
MaheshRavishankar 462e3ccdd0 [mlir][StandardDialect] Add some folding for operations in standard dialect.
Add the following canonicalization
- and(x, 1) -> x
- subi(x, 0) -> x

Differential Revision: https://reviews.llvm.org/D81534
2020-06-15 22:52:29 -07:00
Rahul Joshi e81bf67e8c [MLIR] Modify HasParent trait to allow one of several op's as a parent
- Modify HasParent trait to allow one of several op's as a parent -
- Expose this trait in the ODS framework using the ParentOneOf<> trait.

Differential Revision: https://reviews.llvm.org/D81880
2020-06-16 04:50:56 +00:00
Jonas Devlieghere 388afd8406 [lldb] Remove redundant access specifiers (NFC) 2020-06-15 21:34:13 -07:00
Jonas Devlieghere 5ddd4fc5a6 [lldb/Lua] Fix override/virtual in ScriptInterpreterLua (NFC) 2020-06-15 21:15:35 -07:00
Jonas Devlieghere 93571c3c3b [lldb/Python] Various cleanups in ScriptInterpreterPython (NFC) 2020-06-15 21:07:43 -07:00
Fangrui Song a3b5f428c1 [AArch64] Print the immediate operand for SPACE pseudo instruction
Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D81814
2020-06-15 20:55:53 -07:00
Amara Emerson 1035a416a6 [AArch64][GlobalISel] Emit constant pool loads for 64 bit fp immediates.
Note: don't do this for integer 64 bit materialization to match SDAG.

Differential Revision: https://reviews.llvm.org/D81893
2020-06-15 20:53:09 -07:00
Jonas Devlieghere 8d2acfc40e [lldb/Interpreter] Use std::make_shared<StreamString> (NFC) 2020-06-15 20:48:55 -07:00
Qiu Chaofan e62912b190 [LLParser] Delete temp CallInst when error occurs
Only functions with floating-point return type accepts fast-math flags.
When adding such flags to function returning integer, we'll see a crash,
because there's still an undeleted value referencing the argument. This
patch manually removes the temporary instruction when error occurs.

Reviewed By: arsenm

Differential Revision: https://reviews.llvm.org/D78355
2020-06-16 11:41:25 +08:00
Cyndy Ishida 2ba320846b [llvm][TextAPI/MachO] clean up auto usages in tests, NFC 2020-06-15 19:59:42 -07:00
Xing GUO 8aaeaddec8 [ObjectYAML][DWARF] Implement the .debug_addr section.
This patch implements the .debug_addr section.

Reviewed By: jhenderson, grimar

Differential Revision: https://reviews.llvm.org/D81541
2020-06-16 10:53:10 +08:00
Mircea Trofin 296e47734e [llvm][NFC] Fix license on InlineFeaturesAnalysis.{h|cpp}
Summary: Also fixed the InlineAdvisor.cpp license.

Reviewers: rriddle

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D81896
2020-06-15 19:34:33 -07:00
Craig Topper 255d5dbae1 [X86] Add support for inline assembly 'x' constraint for i128.
Limiting to x86-64 since that's when __int128 is legal in clang.

Differential Revision: https://reviews.llvm.org/D81817
2020-06-15 19:34:02 -07:00
Alexander Shaposhnikov 913bc312b5 [llvm-objcopy][MachO] Add support for LC_CODE_SIGNATURE
This diff adds support for copying binaries
containing a LC_CODE_SIGNATURE load command.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D81768
2020-06-15 18:55:59 -07:00
Jonas Devlieghere 18e356b75d [lldb/Docs] Reword paragraph and omit 'build slave' 2020-06-15 18:25:57 -07:00
Jonas Devlieghere 0965b59bf4 [lldb/debugserver] Rename Master/Slave to Primary/Secondary (NFC) 2020-06-15 18:22:22 -07:00
Yaxun (Sam) Liu 6752786d65 [HIP] Do not use llvm-link/opt/llc for -fgpu-rdc
This patch is a follow up on https://reviews.llvm.org/D81627.

In addition to default -fno-gpu-rdc case, this patches let
HIP toolchain not use llvm-link/opt/llc to link device code
for -fgpu-rdc case. Instead, uses standard lto.

This will eliminate some redundant optimizations and speed
up the compilation/linking.

Differential Revision: https://reviews.llvm.org/D81861
2020-06-15 21:09:18 -04:00
Gui Andrade b0ffa8befe [MSAN] Pass Origin by parameter to __msan_warning functions
Summary:
Normally, the Origin is passed over TLS, which seems like it introduces unnecessary overhead. It's in the (extremely) cold path though, so the only overhead is in code size.

But with eager-checks, calls to __msan_warning functions are extremely common, so this becomes a useful optimization.

This can save ~5% code size.

Reviewers: eugenis, vitalybuka

Reviewed By: eugenis, vitalybuka

Subscribers: hiraditya, #sanitizers, llvm-commits

Tags: #sanitizers, #llvm

Differential Revision: https://reviews.llvm.org/D81700
2020-06-15 17:49:18 -07:00