Commit Graph

366766 Commits

Author SHA1 Message Date
David Blaikie ad68a8b952 DebugInfo: Cleanup RLE dumping, using a length-constrained DataExtractor rather than carrying the end offset separately 2020-09-18 19:32:38 -07:00
Nico Weber 528a1f121c [gn build] (manually) port 5495b69164 2020-09-18 21:27:49 -04:00
Alexander Shaposhnikov 2ca68b6542 [llvm-objcopy][MachO] Clean up the interface of Object
Remove the method addLoadCommand which was used only in a single place.
NFC.

Test plan: make check-all
2020-09-18 18:23:27 -07:00
Nico Weber 90fffdd0f7 Revert "[gn build] (manually) port 9b6765e784b3" anf follow-ups
9b6765e784 was reverted in 549e55b3d5.

This reverts commit 442801a7b9.
This reverts commit 929d91a556.
This reverts commit 7c2d83347f.
2020-09-18 21:14:27 -04:00
Alexander Shaposhnikov 5495b69164 [llvm-objcopy][MachO] Add llvm-bitcode-strip driver
This diff adds llvm-bitcode-strip driver to llvm-objcopy.
In the future this will enable us to build a replacement for the tool bitcode_strip.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D87212
2020-09-18 18:13:05 -07:00
Eric Christopher dbd53a1f0c Temporarily Revert "RegAllocFast: Rewrite and improve"
as it's breaking a few tests in the lldb test suite.

Bot: http://lab.llvm.org:8011/builders/lldb-arm-ubuntu/builds/4226/steps/test/logs/stdio

This reverts commit c8757ff3aa.
2020-09-18 18:11:21 -07:00
Alexander Shaposhnikov e9f9027c3c [llvm-install-name-tool] Validate -id value early
The code which validates the value of -id is moved into the function parseInstallNameToolOptions.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D87855
2020-09-18 17:50:08 -07:00
Fangrui Song 2ac06241d2 [LiveDebugValues] Add `#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)` to suppress -Wunused-function 2020-09-18 17:25:37 -07:00
Vitaly Buka 034781f7f3 [NFC][LSan] Add REQUIRES: linux
Additional registers scaning is only implemented for x86 linux.
2020-09-18 17:24:07 -07:00
Amara Emerson cce24bb38d [AArch64][GlobalISel] Add tests for pre-existing selection support for <4 x s16> arithmetic/bitwise ops. 2020-09-18 17:13:55 -07:00
Amara Emerson 269bcc39ca [AArch64][GlobalISel] Legalize arithmetic ops for <4 x s16> 2020-09-18 17:13:55 -07:00
Vitaly Buka 97bfac076a [NFC][StackSafety] Replace auto with type
Fixes static analyzer is warning.
2020-09-18 17:10:28 -07:00
Vitaly Buka 3ab118a57d [NFC][Asan] Fix test broken by RegAllocFast
The test worked only because by coincidence register with pointer was
clobbered.
After D52010 value is still preserved.
2020-09-18 16:46:20 -07:00
Fangrui Song 76eec6c95b [SCEV] Fix an unused variable in -DLLVM_ENABLE_ASSERTIONS=off build 2020-09-18 16:19:05 -07:00
Amara Emerson 5d34d7f1a0 [GlobalISel] Add lowering support for G_ABS and use for AArch64.
Differential Revision: https://reviews.llvm.org/D87952
2020-09-18 16:17:18 -07:00
Amy Kwan 37e7673c21 [PowerPC] Implement Move to VSR Mask builtins in LLVM/Clang
This patch implements the vec_gen[b|h|w|d|q]m function prototypes in altivec.h
in order to utilize the move to VSR with mask instructions introduced in Power10.

Differential Revision: https://reviews.llvm.org/D82725
2020-09-18 18:16:14 -05:00
Fangrui Song 51b75b87db [lld][WebAssembly] Fix -Wunused-variable after D87663 2020-09-18 16:10:39 -07:00
Vitaly Buka 82827244e9 [NFC][sanitizer] Don't use ::testing::internal 2020-09-18 15:26:05 -07:00
Snehasish Kumar b86f1af423 [clang] Remove profile available check for fsplit-machine-functions.
Enforcing a profile available check in the driver does not work with
incremental LTO builds where the LTO backend invocation does not include
the profile flags. At this point the profiles have already been consumed
and the IR contains profile metadata. Instead we always pass through the
-fsplit-machine-functions flag on user request. The pass itself contains
a check to return early if no profile information is available.

Differential Revision: https://reviews.llvm.org/D87943
2020-09-18 15:08:00 -07:00
Zixu Wang ed79827aea [clang][module] Improve incomplete-umbrella warning
Change the warning message for -Wincomplete-umbrella to report the location of the umbrella header;

Differential Revision: https://reviews.llvm.org/D82118
2020-09-18 14:56:47 -07:00
Philip Reames 06f136f61e [instcombine][x86] Converted pdep/pext with shifted mask to simple arithmetic
If the mask of a pdep or pext instruction is a shift masked (i.e. one contiguous block of ones) we need at most one and and one shift to represent the operation without the intrinsic. One all platforms I know of, this is faster than the pdep/pext.

The cost modelling for multiple contiguous blocks might be worth exploring in a follow up, but it's not relevant for my current use case. It would almost certainly be a win on AMDs where these are really really slow though.

Differential Revision: https://reviews.llvm.org/D87861
2020-09-18 14:54:24 -07:00
Arthur Eubanks 7c10129f5a [test][InstrProf] Fix always_inline.ll under NPM
NPM's inliner does not clean up dead functions.

Differential Revision: https://reviews.llvm.org/D87922
2020-09-18 14:50:47 -07:00
Eric Christopher 549e55b3d5 Temporarily Revert "[clangd] Add Random Forest runtime for code completion."
as a header doesn't appear to have made it into the commit.

This reverts commit 9b6765e784 and followup
2020-09-18 14:47:43 -07:00
Lei Zhang 1f0b43638e [spirv] Move device info from resource limit into target env
Vendor/device information are not resource limits. Moving to
target environment directly for better organization.

Reviewed By: mravishankar

Differential Revision: https://reviews.llvm.org/D87911
2020-09-18 17:41:07 -04:00
Reid Kleckner 9932561b48 [COFF] Move per-global .drective emission from AsmPrinter to TLOFCOFF
This changes the order of output sections and the output assembly, but
is otherwise NFC.

It simplifies the TLOF interface by removing two COFF-only methods.
2020-09-18 14:31:01 -07:00
Vedant Kumar 3c731ba5f1 [llvm-cov] Allow commas in filenames passed to `-object` flag
Currently, -object takes a comma separated list of objects as an
argument, which prevents it working with path names that contain a
comma. Drop comma-separated support, which requires to set pass the
-object flag multiple times to set multiple objects.

Patch by Andrew Gallagher!

Differential Revision: https://reviews.llvm.org/D87003
2020-09-18 13:46:29 -07:00
Vitaly Buka 516d757432 [msan][asan] Add runtime flag intercept_strcmp
Can be used to disable interceptor to workaround issues of
non-instrumented code.

Reviewed By: morehouse, eugenis

Differential Revision: https://reviews.llvm.org/D87897
2020-09-18 13:45:55 -07:00
Joseph Huber 1c4c21489f [OpenMP] Initial Support for OpenMP Webpage Documentation
Summary:
Adding support for generated html documentation for OpenMP. Changing
Cmake files to build the documentation and adding the base templates for
future documentation to be added.

Reviewers: jdoerfert

Subscribers: aaron.ballman arphaman guansong mgorny openmp-commits sstefan1 yaxunl

Tags: #OpenMP

Differential Revision: https://reviews.llvm.org/D87797
2020-09-18 16:32:22 -04:00
Nico Weber 807777913e CompletionModelCodegen: Remove unused import
The unused import is 3.4+, so it also breaks py2.7 compat.
But this is easy to fix :)
2020-09-18 16:24:58 -04:00
Nico Weber 7502040ed2 clang: Make changes in 7c8bb409f3 py2.7-compatible 2020-09-18 16:15:37 -04:00
Sanjay Patel d3b0644e22 [InstSimplify] add tests for constant folding fmin/fmax with undef op; NFC 2020-09-18 16:09:44 -04:00
Nico Weber 7c2d83347f [gn build] add file i forgot to add in 929d91a556 2020-09-18 16:01:00 -04:00
Nico Weber 929d91a556 [gn build] (manually) port 9b6765e784 more 2020-09-18 15:56:34 -04:00
Eric Christopher ecfd8161bf Temporarily Revert "[SLP] Allow reordering of vectorization trees with reused instructions."
as it's infinite looping on occasion.

This reverts commit 455ca0ebb6.
2020-09-18 12:50:04 -07:00
Miklos Vajna b168bbfae4 [clang-format] Recognize "hxx" as a C++ header in clang-format-diff.py
And shift "proto" to the next line to avoid a too long line.

Reviewed By: MyDeveloperDay

Differential Revision: https://reviews.llvm.org/D87931
2020-09-18 21:43:18 +02:00
Nico Weber 9b346f974e [gn build] Do not sync filenames containing variable references 2020-09-18 15:34:33 -04:00
Krzysztof Parzyszek ae0ecb3c50 Pre-commit test for CSEing masked loads/stores 2020-09-18 14:30:53 -05:00
Nico Weber 442801a7b9 [gn build] (manually) port 9b6765e784 2020-09-18 15:26:58 -04:00
Nico Weber 0ea2a57274 clangd: Make ompletionModelCodegen.py tpy2.7 compatible
LLVM still supports Python 2.7, so unbreak bots that still run that.
In a separate commit so that this is easy to revert once we drop
support :)
2020-09-18 15:26:58 -04:00
Stella Laurenzo 85185b61b6 First pass on MLIR python context lifetime management.
* Per thread https://llvm.discourse.group/t/revisiting-ownership-and-lifetime-in-the-python-bindings/1769
* Reworks contexts so it is always possible to get back to a py::object that holds the reference count for an arbitrary MlirContext.
* Retrofits some of the base classes to automatically take a reference to the context, elimintating keep_alives.
* More needs to be done, as discussed, when moving on to the operations/blocks/regions.

Differential Revision: https://reviews.llvm.org/D87886
2020-09-18 12:17:50 -07:00
Peter Collingbourne 7bd75b6301 scudo: Add an API for disabling memory initialization per-thread.
Here "memory initialization" refers to zero- or pattern-init on
non-MTE hardware, or (where possible to avoid) memory tagging on MTE
hardware. With shared TSD the per-thread memory initialization state
is stored in bit 0 of the TLS slot, similar to PointerIntPair in LLVM.

Differential Revision: https://reviews.llvm.org/D87739
2020-09-18 12:04:27 -07:00
Simon Pilgrim 4ebd30722a [X86][AVX] lowerBuildVectorAsBroadcast - improve BROADCASTM lowering on non-VLX targets
Broadcast to a ZMM type then extract the low subvector.
2020-09-18 19:52:02 +01:00
Arthur Eubanks 2b1cb6d54a [test][TSan] Fix tests under NPM
Under NPM, the TSan passes are split into a module and function pass. A
couple tests were testing for inserted module constructors, which is
only part of the module pass.
2020-09-18 11:37:55 -07:00
Huihui Zhang 9ad6049736 [InstCombine][SVE] Skip scalable type for InstCombiner::getFlippedStrictnessPredicateAndConstant.
We cannot iterate on scalable vector, the number of elements is unknown at compile-time.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D87918
2020-09-18 11:26:36 -07:00
David Blaikie 82af17cde8 Linewrap & remove some dead typedefs from previous commit
Cleanup for 51a505340d
2020-09-18 11:22:37 -07:00
David Blaikie 51a505340d DebugInfo: Simplify line table parsing to take all the units together, rather than CUs and TUs separately 2020-09-18 11:18:23 -07:00
James Y Knight f7a53d82c0 PR47468: Fix findPHICopyInsertPoint, so that copies aren't incorrectly inserted after an INLINEASM_BR.
findPHICopyInsertPoint special cases placement in a block with a
callbr or invoke in it. In that case, we must ensure that the copy is
placed before the INLINEASM_BR or call instruction, if the register is
defined prior to that instruction, because it may jump out of the
block.

Previously, the code placed it immediately after the last def _or
use_. This is wrong, if the use is the instruction which may jump.  We
could correctly place it immediately after the last def (ignoring
uses), but that is non-optimal for register pressure.

Instead, place the copy after the last def, or before the
call/inlineasm_br, whichever is later.

Differential Revision: https://reviews.llvm.org/D87865
2020-09-18 14:14:04 -04:00
Simon Pilgrim ecba9d793e [X86][AVX] Add missing non AVX512VL broadcastm test coverage 2020-09-18 19:11:29 +01:00
Matt Arsenault 3105d0f84b CodeGen: Move split block utility to MachineBasicBlock
AMDGPU needs this in several places, so consolidate them here.
2020-09-18 14:05:18 -04:00
Matt Arsenault c8757ff3aa RegAllocFast: Rewrite and improve
This rewrites big parts of the fast register allocator. The basic
strategy of doing block-local allocation hasn't changed but I tweaked
several details:

Track register state on register units instead of physical
registers. This simplifies and speeds up handling of register aliases.
Process basic blocks in reverse order: Definitions are known to end
register livetimes when walking backwards (contrary when walking
forward then uses may or may not be a kill so we need heuristics).

Check register mask operands (calls) instead of conservatively
assuming everything is clobbered.  Enhance heuristics to detect
killing uses: In case of a small number of defs/uses check if they are
all in the same basic block and if so the last one is a killing use.
Enhance heuristic for copy-coalescing through hinting: We check the
first k defs of a register for COPYs rather than relying on there just
being a single definition.  When testing this on the full llvm
test-suite including SPEC externals I measured:

average 5.1% reduction in code size for X86, 4.9% reduction in code on
aarch64. (ranging between 0% and 20% depending on the test) 0.5%
faster compiletime (some analysis suggests the pass is slightly slower
than before, but we more than make up for it because later passes are
faster with the reduced instruction count)

Also adds a few testcases that were broken without this patch, in
particular bug 47278.

Patch mostly by Matthias Braun
2020-09-18 14:05:18 -04:00