OSDN Git Service
Nikita Popov [Tue, 16 Apr 2019 20:31:41 +0000 (20:31 +0000)]
[CVP] Simplify umulo and smulo that cannot overflow
If a umul.with.overflow or smul.with.overflow operation cannot
overflow, simplify it to a simple mul nuw / mul nsw. After the
refactoring in D60668 this is just a matter of removing an
explicit check against multiplications.
Differential Revision: https://reviews.llvm.org/D60791
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358521
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Afanasyev [Tue, 16 Apr 2019 19:43:18 +0000 (19:43 +0000)]
[Support][JSON] Add reserve() to json Array
Summary:
Space reservation increases json lib performance for the arrays with large number of entries.
Here is the example and discussion: https://reviews.llvm.org/D60609#
1468941
Reviewers: lebedev.ri, sammccall
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60788
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358520
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 16 Apr 2019 19:27:00 +0000 (19:27 +0000)]
[SLP] Refactoring of the operand reordering code.
This is a refactoring patch which should have all the functionality of the current code. Its goal is twofold:
i. Cleanup and simplify the reordering code, and
ii. Generalize reordering so that it will work for an arbitrary number of operands, not just 2.
This is the second patch in a series of patches that will enable operand reordering across chains of operations. An example of this was presented in EuroLLVM'18 https://www.youtube.com/watch?v=gIEn34LvyNo .
Committed on behalf of @vporpo (Vasileios Porpodas)
Differential Revision: https://reviews.llvm.org/D59973
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358519
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Tue, 16 Apr 2019 19:25:35 +0000 (19:25 +0000)]
[CVP] Add tests for non-overflowing mulo; NFC
Should be simplified to simple mul.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358517
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Tue, 16 Apr 2019 19:18:53 +0000 (19:18 +0000)]
[X86][AVX] X86ISD::PERMV/PERMV3 node types can never fold index ops
Improves codegen demonstrated by D60512 - instructions represented by X86ISD::PERMV/PERMV3 can never memory fold the operand used for their index register.
This patch updates the 'isUseOfShuffle' helper into the more capable 'isFoldableUseOfShuffle' that recognises that the op is used for a X86ISD::PERMV/PERMV3 index mask and can't be folded - allowing us to use broadcast/subvector-broadcast ops to reduce the size of the mask constant pool data.
Differential Revision: https://reviews.llvm.org/D60562
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358516
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Tue, 16 Apr 2019 19:05:49 +0000 (19:05 +0000)]
[InstCombine] Prune fshl/fshr with masked operands
If a constant shift amount is used, then only some of the LHS/RHS
operand bits are demanded and we may be able to simplify based on
that. InstCombineSimplifyDemanded already had the necessary support
for that, we just weren't calling it with fshl/fshr as root.
In particular, this allows us to relax some masked funnel shifts
into simple shifts, as shown in the tests.
Patch by Shawn Landden.
Differential Revision: https://reviews.llvm.org/D60660
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358515
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Tue, 16 Apr 2019 19:05:40 +0000 (19:05 +0000)]
[InstCombine] Add tests for fshl/fshr with masked operands; NFC
Baseline tests for D60660.
Patch by Shawn Landden.
Differential Revision: https://reviews.llvm.org/D60688
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358514
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Tue, 16 Apr 2019 18:58:03 +0000 (18:58 +0000)]
[x86] add more tests for LEA formation; NFC
Promoting the shift to the wider type should allow LEA.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358513
91177308-0d34-0410-b5e6-
96231b3b80d8
Nikita Popov [Tue, 16 Apr 2019 18:55:16 +0000 (18:55 +0000)]
[IR] Add WithOverflowInst class
This adds a WithOverflowInst class with a few helper methods to get
the underlying binop, signedness and nowrap type and makes use of it
where sensible. There will be two more uses in D60650/D60656.
The refactorings are all NFC, though I left some TODOs where things
could be improved. In particular we have two places where add/sub are
handled but mul isn't.
Differential Revision: https://reviews.llvm.org/D60668
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358512
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Tue, 16 Apr 2019 16:32:59 +0000 (16:32 +0000)]
[Tests] Add branch_weights to latches so that test is not effected by future profitability patch to LoopPredication
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358506
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Tue, 16 Apr 2019 16:05:07 +0000 (16:05 +0000)]
[Hexagon] Remove indeterministic traversal order
Patch by Sergei Larin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358505
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Tue, 16 Apr 2019 15:58:42 +0000 (15:58 +0000)]
[llvm-objdump] Test tabs in disassemble-align.s with a more visible character
Summary: Apply rupprecht's suggestion in D60376
Reviewers: rupprecht
Reviewed By: rupprecht
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60777
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358504
91177308-0d34-0410-b5e6-
96231b3b80d8
Luis Marques [Tue, 16 Apr 2019 15:09:18 +0000 (15:09 +0000)]
[DAGCombiner] Add missing flag to addressing mode check
The checks in `canFoldInAddressingMode` tested for addressing modes that have a
base register but didn't set the `HasBaseReg` flag to true (it's false by
default). This patch fixes that. Although the omission of the flag was
technically incorrect it had no known observable impact, so no tests were
changed by this patch.
Differential Revision: https://reviews.llvm.org/D60314
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358502
91177308-0d34-0410-b5e6-
96231b3b80d8
whitequark [Tue, 16 Apr 2019 15:00:19 +0000 (15:00 +0000)]
[OCaml] Update api to account for FNeg and CallBr instructions
Summary:
This diff adds minimal support for the recent FNeg and CallBr
instructions to the OCaml bindings.
Reviewers: whitequark
Reviewed By: whitequark
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60680
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358501
91177308-0d34-0410-b5e6-
96231b3b80d8
Luis Marques [Tue, 16 Apr 2019 14:38:32 +0000 (14:38 +0000)]
[RISCV] Custom lower SHL_PARTS, SRA_PARTS, SRL_PARTS
When not optimizing for minimum size (-Oz) we custom lower wide shifts
(SHL_PARTS, SRA_PARTS, SRL_PARTS) instead of expanding to a libcall.
Differential Revision: https://reviews.llvm.org/D59477
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358498
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 16 Apr 2019 14:35:18 +0000 (14:35 +0000)]
[SystemZ] Add missing intrinsics to intrinsics-immarg.ll
As of r356091, support for the ImmArg intrinsics was added,
including a SystemZ test case. However, that test case doesn't
actually verify all SystemZ intrinsics with immediate arguments,
only a subset. The rest of them actually works correctly, there's
just no test for them. This patch add all missing intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358495
91177308-0d34-0410-b5e6-
96231b3b80d8
Kadir Cetinkaya [Tue, 16 Apr 2019 14:32:43 +0000 (14:32 +0000)]
[llvm][Support] Provide interface to set thread priorities
Summary:
We have a multi-platform thread priority setting function(last piece
landed with D58683), I wanted to make this available to all llvm community,
there seem to be other users of such functionality with portability fixmes:
lib/Support/CrashRecoveryContext.cpp
tools/clang/tools/libclang/CIndex.cpp
Reviewers: gribozavr, ioeric
Subscribers: krytarowski, jfb, kristina, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59130
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358494
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 16 Apr 2019 14:24:42 +0000 (14:24 +0000)]
llvm-undname: Consistently use "return nullptr" in functions returning pointers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358492
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 16 Apr 2019 14:10:34 +0000 (14:10 +0000)]
llvm-undname: Fix nullptr deref on invalid structor names in template args
Similar to r358421: A StructorIndentifierNode has a Class field which
is read when printing it, but if the StructorIndentifierNode appears in
a template argument then demangleFullyQualifiedSymbolName() which sets
Class isn't called. Since StructorIndentifierNodes are always leaf
names, we can just reject them as well.
Found by oss-fuzz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358491
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 16 Apr 2019 13:52:30 +0000 (13:52 +0000)]
llvm-undname: Tweak arena allocator
- Make `allocUnalignedBuffer` look more like `allocArray` and `alloc`.
No behavior change.
- Change `Head->Used < Head->Capacity` to `Head->Used <= Head->Capacity`
in `allocArray` and `alloc`. No intended behavior change, might be a
minuscule memory usage improvement. Noticed this since it was the logic
used in `allocUnalignedBuffer`.
- Don't let `allocArray` alloc too small buffers for names that have
more than 512 levels of nesting (in 64-bit builds). Fixes a heap
buffer overflow found by oss-fuzz.
Differential Revision: https://reviews.llvm.org/D60774
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358489
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 16 Apr 2019 13:30:50 +0000 (13:30 +0000)]
llvm-undname: add a missing CHECK: to a passing test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358488
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 16 Apr 2019 13:18:51 +0000 (13:18 +0000)]
Fix llvm-undname tests after r358485
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358487
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 16 Apr 2019 12:54:43 +0000 (12:54 +0000)]
gn build: Merge r358422
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358486
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Tue, 16 Apr 2019 12:51:40 +0000 (12:51 +0000)]
llvm-undname: Add a -raw-file flag to pass a raw buffer to microsoftDemangle
The default handling splits input into lines. Since
llvm-microsoft-demangle-fuzzer doesn't do this, oss-fuzz produces inputs
that only trigger crashes if the input isn't split into lines. This adds
a hidden flag -raw-file which passes file contents to microsoftDemangle() in
the same way the fuzzer does, for reproducing oss-fuzz reports.
Also change llvm-undname to have a non-0 exit code for invalid symbols.
Differential Revision: https://reviews.llvm.org/D60771
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358485
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 16 Apr 2019 12:13:25 +0000 (12:13 +0000)]
Re-commit r357452: SimplifyCFG SinkCommonCodeFromPredecessors: Also sink function calls without used results (PR41259)
The original commit caused false positives from AddressSanitizer's
use-after-scope checks, which have now been fixed in r358478.
> The code was previously checking that candidates for sinking had exactly
> one use or were a store instruction (which can't have uses). This meant
> we could sink call instructions only if they had a use.
>
> That limitation seemed a bit arbitrary, so this patch changes it to
> "instruction has zero or one use" which seems more natural and removes
> the need to special-case stores.
>
> Differential revision: https://reviews.llvm.org/D59936
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358483
91177308-0d34-0410-b5e6-
96231b3b80d8
Dmitri Gribenko [Tue, 16 Apr 2019 09:46:02 +0000 (09:46 +0000)]
Removed CMake cache upgrade code from 2011
Summary:
This code was added in r141266 to make a breaking change to CMake, but
still be compatible with existing cache files. The cache files from
2011 are irrelevant today in 2019.
Subscribers: mgorny, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60711
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358482
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 16 Apr 2019 07:54:20 +0000 (07:54 +0000)]
Asan use-after-scope: don't poison allocas if there were untraced lifetime intrinsics in the function (PR41481)
If there are any intrinsics that cannot be traced back to an alloca, we
might have missed the start of a variable's scope, leading to false
error reports if the variable is poisoned at function entry. Instead, if
there are some intrinsics that can't be traced, fail safe and don't
poison the variables in that function.
Differential revision: https://reviews.llvm.org/D60686
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358478
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Afanasyev [Tue, 16 Apr 2019 06:35:07 +0000 (06:35 +0000)]
Use native llvm JSON library for time profiler output
Summary: Replace plain json text output with llvm JSON library wrapper using.
Reviewers: takuto.ikuta, lebedev.ri
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60609
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358476
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Tue, 16 Apr 2019 03:56:55 +0000 (03:56 +0000)]
[llvm-objdump] Align instructions to a tab stop in disassembly output
This relands D60376/rL358405, with the difference: sed 'y/\t/ /' -> tr '\t' ' '
BSD sed doesn't support escape characters for the 'y' command.
I didn't use it in rL358405 because it was not listed at
https://llvm.org/docs/GettingStarted.html#software but it
should be available.
Original description:
In GNU objdump, -w/--wide aligns instructions in the disassembly output.
This patch does the same to llvm-objdump. However, we always use the
wide format (-w/--wide is ignored), because the narrow format
(instructions are misaligned) is probably not very useful.
In llvm-readobj, we made a similar decision: always use the wide format,
accept but ignore -W/--wide.
To save some columns, we change the tab before hex bytes (controlled by
--[no-]show-raw-insn) to a space.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358474
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Tue, 16 Apr 2019 02:37:29 +0000 (02:37 +0000)]
[llvm-objdump] Simplify PrintHelpMessage() logic
This relands rL358418. It missed one test that should also use -macho
Note, all the other -private-header -exports-trie tests are used
together with -macho.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358472
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 16 Apr 2019 02:12:05 +0000 (02:12 +0000)]
[CodeExtractor] Add a few debug lines to understand why a region is not extracted
The CodeExtractor is not smart enough to compute which basic block is
the entry of a region. Instead it relies on the order of the list
of basic blocks that is handed to it and assumes that the entry
is the first block in the list.
Without the additional debug information, it is hard to understand
why a valid region does not get extracted, because we would miss
that the order of in the list just doesn't match what the CodeExtractor
wants.
NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358471
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Tue, 16 Apr 2019 01:06:03 +0000 (01:06 +0000)]
Remove some more unused headers from MachineFunction.h and friends.
Most of these headers are still included via transitive includes and
so won't likely show any problems or improvements in incremental
rebuild time.
Differential Revision: https://reviews.llvm.org/D60741
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358468
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Tue, 16 Apr 2019 00:18:50 +0000 (00:18 +0000)]
Reapply [Support] Fix recursive response file expansion guard
The test in the dependent revision has been fixed for Windows.
Original commit message:
Response file expansion limits the amount of expansion to prevent
potential infinite recursion. However, the current logic assumes that
any argument beginning with @ is a response file, which is not true for
e.g. `-Xlinker -rpath -Xlinker @executable_path/../lib` on Darwin.
Having too many of these non-response file arguments beginning with @
prevents actual response files from being expanded. Instead, limit based
on the number of successful response file expansions, which should still
prevent infinite recursion but also avoid false positives.
Differential Revision: https://reviews.llvm.org/D60631
llvm-svn: 358452
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358466
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Tue, 16 Apr 2019 00:18:47 +0000 (00:18 +0000)]
Reapply [Support] Add a test for recursive response file expansion
Use the appropriate tokenizer to fix the test on Windows.
Original commit message:
I'm going to be modifying the logic to avoid infinitely recursing on
self-referential response files, so add a unit test to verify the
expected behavior.
Differential Revision: https://reviews.llvm.org/D60630
llvm-svn: 358451
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358465
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Mon, 15 Apr 2019 22:51:54 +0000 (22:51 +0000)]
Revert [Support] Add a test for recursive response file expansion
This reverts r358451 (git commit
c8497467edc5766ae81ffbde58159f8c6af50803)
The test breaks a Windows buildbot:
http://lab.llvm.org:8011/builders/llvm-clang-x86_64-expensive-checks-win/builds/17016/steps/test-check-all/logs/stdio
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358461
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Mon, 15 Apr 2019 22:51:53 +0000 (22:51 +0000)]
Revert [Support] Fix recursive response file expansion guard
This reverts r358452 (git commit
c8df4fb9c3865eac52a99602c26bbc070098c3d4)
A dependent commit breaks the Windows buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358460
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 15 Apr 2019 22:36:12 +0000 (22:36 +0000)]
Revert r358405: "[llvm-objdump] Align instructions to a tab stop in disassembly output"
The test fails on darwin due to a sed error:
sed: 1: "y/\t/ /": transform strings are not the same length
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358459
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Mon, 15 Apr 2019 22:34:08 +0000 (22:34 +0000)]
[AArch64][GlobalISel] Don't do extending loads combine for non-pow-2 types.
Since non-pow-2 types are going to get split up into multiple loads anyway,
don't do the [SZ]EXTLOAD combine for those and save us trouble later in
legalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358458
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Mon, 15 Apr 2019 22:23:46 +0000 (22:23 +0000)]
[LSR] Rewrite misses some fixup locations if it splits critical edge
If LSR split critical edge during rewriting phi operands and
phi node has other pending fixup operands, we need to
update those pending fixups. Otherwise formulae will not be
implemented completely and some instructions will not be eliminated.
llvm.org/PR41445
Differential Revision: https://reviews.llvm.org/D60645
Patch by: Denis Bakhvalov <denis.bakhvalov@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358457
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Mon, 15 Apr 2019 22:07:56 +0000 (22:07 +0000)]
Only use argv[0] as the main executable name if it exists.
Under some environments, argv[0] doesn't hold a valid file name, but
sys::fs::getMainExecutable will find the main executable properly.
This patch tweaks the logic to fall back to sys::fs::getMainExecutable
in more situations.
Differential Revision: https://reviews.llvm.org/D60730
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358455
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 15 Apr 2019 21:51:51 +0000 (21:51 +0000)]
[EarlyCSE] add more tests for double-negated select condition; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358454
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Mon, 15 Apr 2019 21:31:28 +0000 (21:31 +0000)]
[Support] Fix recursive response file expansion guard
Response file expansion limits the amount of expansion to prevent
potential infinite recursion. However, the current logic assumes that
any argument beginning with @ is a response file, which is not true for
e.g. `-Xlinker -rpath -Xlinker @executable_path/../lib` on Darwin.
Having too many of these non-response file arguments beginning with @
prevents actual response files from being expanded. Instead, limit based
on the number of successful response file expansions, which should still
prevent infinite recursion but also avoid false positives.
Differential Revision: https://reviews.llvm.org/D60631
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358452
91177308-0d34-0410-b5e6-
96231b3b80d8
Shoaib Meenai [Mon, 15 Apr 2019 21:31:25 +0000 (21:31 +0000)]
[Support] Add a test for recursive response file expansion
I'm going to be modifying the logic to avoid infinitely recursing on
self-referential response files, so add a unit test to verify the
expected behavior.
Differential Revision: https://reviews.llvm.org/D60630
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358451
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Apr 2019 21:06:32 +0000 (21:06 +0000)]
[X86] Limit the 'x' inline assembly constraint to zmm0-15 when used for a 512 type.
The 'v' constraint is used to select zmm0-31. This makes 512 bit consistent with 128/256-bit.a
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358450
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Apr 2019 21:06:23 +0000 (21:06 +0000)]
[X86] Fix a stack folding test to have a full xmm2-31 clobber list instead of stopping at xmm15. Add an additional dependency to keep instruction below inline asm block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358449
91177308-0d34-0410-b5e6-
96231b3b80d8
Anton Afanasyev [Mon, 15 Apr 2019 21:02:47 +0000 (21:02 +0000)]
Time profiler: small fixes and optimizations
Summary: Fixes from Roman's review here: https://reviews.llvm.org/D58675#
1465336
Reviewers: lebedev.ri
Subscribers: hiraditya, mgrang, cfe-commits, llvm-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D60663
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358448
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 15 Apr 2019 20:51:12 +0000 (20:51 +0000)]
AMDGPU: Fix unreachable when counting register usage of SGPR96
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358447
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 15 Apr 2019 20:42:18 +0000 (20:42 +0000)]
AMDGPU: Fix printed format of SReg_96
These are artificial, so I think this should only come up with inline
asm comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358446
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 15 Apr 2019 20:25:31 +0000 (20:25 +0000)]
[EarlyCSE] add test for select condition double-negation; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358444
91177308-0d34-0410-b5e6-
96231b3b80d8
Alex Lorenz [Mon, 15 Apr 2019 20:16:19 +0000 (20:16 +0000)]
Revert r358418: "[llvm-objdump] Simplify PrintHelpMessage() logic"
This reverts commit r358418 as it broke `test/Object/objdump-export-list`
on Darwin.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358443
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 15 Apr 2019 19:45:27 +0000 (19:45 +0000)]
[Tests] Add a few more tests for LoopPredication w/invariant loads
Making sure to cover an important legality cornercase.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358439
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Apr 2019 18:39:45 +0000 (18:39 +0000)]
[X86] Block i32/i64 for 'k' and 'Yk' in getRegForInlineAsmConstraint without avx512bw.
32 and 64 bit k-registers require avx512bw. If we don't block this properly, it leads to a crash.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358436
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 15 Apr 2019 18:15:08 +0000 (18:15 +0000)]
[LoopPred] Stop passing around builders [NFC]
This is a preparatory patch for D60093. This patch itself is NFC, but while preparing this I noticed and committed a small hoisting change in rL358419.
The basic structure of the new scheme is that we pass around the guard ("the using instruction"), and select an optimal insert point by examining operands at each construction point. This seems conceptually a bit cleaner to start with as it isolates the knowledge about insertion safety at the actual insertion point.
Note that the non-hoisting path is not actually used at the moment. That's not exercised until D60093 is rebased on this one.
Differential Revision: https://reviews.llvm.org/D60718
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358434
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 15 Apr 2019 17:38:47 +0000 (17:38 +0000)]
[x86] update test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358432
91177308-0d34-0410-b5e6-
96231b3b80d8
Wolfgang Pieb [Mon, 15 Apr 2019 17:36:29 +0000 (17:36 +0000)]
[DEBUGINFO] Prevent Instcombine from dropping debuginfo when removing zexts
Zexts can be treated like no-op casts when it comes to assessing whether their
removal affects debug info.
Reviewer: aprantl
Differential Revision: https://reviews.llvm.org/D60641
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358431
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Couperus [Mon, 15 Apr 2019 17:36:19 +0000 (17:36 +0000)]
Add explicit dependency to MCDwarf.h in ARC backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358430
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Yamauchi [Mon, 15 Apr 2019 17:29:21 +0000 (17:29 +0000)]
Fix header guard typo and build error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358429
91177308-0d34-0410-b5e6-
96231b3b80d8
Don Hinton [Mon, 15 Apr 2019 17:18:10 +0000 (17:18 +0000)]
[CommandLineParser] Add DefaultOption flag
Summary: Add DefaultOption flag to CommandLineParser which provides a
default option or alias, but allows users to override it for some
other purpose as needed.
Also, add `-h` as a default alias to `-help`, which can be seamlessly
overridden by applications like llvm-objdump and llvm-readobj which
use `-h` as an alias for other options.
(relanding after revert, r358414)
Added DefaultOptions.clear() to reset().
Reviewers: alexfh, klimek
Reviewed By: klimek
Subscribers: kristina, MaskRay, mehdi_amini, inglorion, dexonsmith, hiraditya, llvm-commits, jhenderson, arphaman, cfe-commits
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D59746
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358428
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Apr 2019 17:17:35 +0000 (17:17 +0000)]
[X86] Restore the pavg intrinsics.
The pattern we replaced these with may be too hard to match as demonstrated by
PR41496 and PR41316.
This patch restores the intrinsics and then we can start focusing
on the optimizing the intrinsics.
I've mostly reverted the original patch that removed them. Though I modified
the avx512 intrinsics to not have masking built in.
Differential Revision: https://reviews.llvm.org/D60674
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358427
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Fertile [Mon, 15 Apr 2019 17:08:43 +0000 (17:08 +0000)]
Add slbfee instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358425
91177308-0d34-0410-b5e6-
96231b3b80d8
Hiroshi Yamauchi [Mon, 15 Apr 2019 16:49:00 +0000 (16:49 +0000)]
[PGO] Profile guided code size optimization.
Summary:
Enable some of the existing size optimizations for cold code under PGO.
A ~5% code size saving in big internal app under PGO.
The way it gets BFI/PSI is discussed in the RFC thread
http://lists.llvm.org/pipermail/llvm-dev/2019-March/130894.html
Note it doesn't currently touch loop passes.
Reviewers: davidxl, eraman
Reviewed By: eraman
Subscribers: mgorny, javed.absar, smeenai, mehdi_amini, eraman, zzheng, steven_wu, dexonsmith, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D59514
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358422
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 15 Apr 2019 16:42:44 +0000 (16:42 +0000)]
llvm-undname: Fix nullptr deref on invalid conversion operator names in template args
A ConversionOperatorIdentifierNode has a TargetType which is read when
printing it, but if the ConversionOperatorIdentifierNode appears in a
template argument there's nothing that can provide the TargetType.
Normally the COIN is a symbol (leaf) name and takes its TargetType from the
symbol's type, but in a template argument context the COIN can only be
either a non-leaf name piece or a type, and must hence be invalid.
Similar to the COIN check in demangleDeclarator().
Found by oss-fuzz.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358421
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 15 Apr 2019 16:01:05 +0000 (16:01 +0000)]
[EarlyCSE] add tests for selects with commuted operands (PR41101); NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358420
91177308-0d34-0410-b5e6-
96231b3b80d8
Philip Reames [Mon, 15 Apr 2019 15:53:25 +0000 (15:53 +0000)]
[LoopPred] Hoist and of predicated checks where legal
If we have multiple range checks which can be predicated, hoist the and of the results outside the loop. This minorly cleans up the resulting IR, but the main motivation is as a building block for D60093.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358419
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 15:52:32 +0000 (15:52 +0000)]
[llvm-objdump] Simplify PrintHelpMessage() logic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358418
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 15:31:42 +0000 (15:31 +0000)]
[llvm-objdump] Wrap things in namespace llvm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358417
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 15:08:01 +0000 (15:08 +0000)]
[llvm-objdump] Delete unused forward declarations
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358416
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 15:00:10 +0000 (15:00 +0000)]
[llvm-objdump] Reorganize cl::opt variables and move Mach-O specifics to MachODump.cpp
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358415
91177308-0d34-0410-b5e6-
96231b3b80d8
Ilya Biryukov [Mon, 15 Apr 2019 14:43:50 +0000 (14:43 +0000)]
Revert r358337: "[CommandLineParser] Add DefaultOption flag"
The change causes test failures under asan. Reverting to unbreak our
integrate.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358414
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 15 Apr 2019 14:02:37 +0000 (14:02 +0000)]
[EarlyCSE] regenerate test checks; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358407
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 13:32:41 +0000 (13:32 +0000)]
[llvm-objdump] Align instructions to a tab stop in disassembly output
Summary:
In GNU objdump, -w/--wide aligns instructions in the disassembly output.
This patch does the same to llvm-objdump. However, we always use the
wide format (-w/--wide is ignored), because the narrow format
(instructions are misaligned) is probably not very useful.
In llvm-readobj, we made a similar decision: always use the wide format,
accept but ignore -W/--wide.
To save some columns, we change the tab before hex bytes (controlled by
--[no-]show-raw-insn) to a space.
Reviewers: rupprecht, jhenderson, grimar
Reviewed By: jhenderson
Subscribers: llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60376
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358405
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Mon, 15 Apr 2019 13:23:38 +0000 (13:23 +0000)]
[InstCombine] canonicalize fdiv after fmul if reassociation is allowed
(X / Y) * Z --> (X * Z) / Y
This can allow other optimizations/reassociations as shown in the test diffs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358404
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 15 Apr 2019 12:04:10 +0000 (12:04 +0000)]
DAG: propagate ConsecutiveRegs flags to returns too.
Arguments already have a flag to inform backends when they have been split up.
The AArch64 arm64_32 ABI makes use of these on return types too, so that code
emitted for armv7k can be ABI-compliant.
There should be no CodeGen changes yet, just making more information available.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358399
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 15 Apr 2019 12:03:54 +0000 (12:03 +0000)]
DAG: propagate whether an arg is a pointer for CallingConv decisions.
The arm64_32 ABI specifies that pointers (despite being 32-bits) should be
zero-extended to 64-bits when passed in registers for efficiency reasons. This
means that the SelectionDAG needs to be able to tell the backend that an
argument was originally a pointer, which is implmented here.
Additionally, some memory intrinsics need to be declared as taking an i8*
instead of an iPTR.
There should be no CodeGen change yet, but it will be triggered when AArch64
backend support for ILP32 is added.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358398
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Mon, 15 Apr 2019 11:25:23 +0000 (11:25 +0000)]
gn build: Merge r358390
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358397
91177308-0d34-0410-b5e6-
96231b3b80d8
Eugene Leviant [Mon, 15 Apr 2019 11:21:47 +0000 (11:21 +0000)]
[llvm-readelf] Correctly dump symbols whose section id is SHN_XINDEX
Differential revision: https://reviews.llvm.org/D60614
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358396
91177308-0d34-0410-b5e6-
96231b3b80d8
Stephen Tozer [Mon, 15 Apr 2019 11:17:48 +0000 (11:17 +0000)]
[llvm-readobj] Reapply: Improve error message for --string-dump
This is a resubmission of a previous patch that caused test failures,
with the fixes for the relevant tests included.
Fixes bug 40630: https://bugs.llvm.org/show_bug.cgi?id=40630
This patch changes the error message when the section specified by
--string-dump cannot be found by including the name of the section in
the error message and changing the prefix text to not imply that the
file itself was invalid. As part of this change some uses of
std::error_code have been replaced with the llvm Error class to better
encapsulate the error info (rather than passing File strings around),
and the WithColor class replaces string literal error prefixes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358395
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Renouf [Mon, 15 Apr 2019 10:36:24 +0000 (10:36 +0000)]
[AMDGPU] Fixed incorrect test in vcnd/vcmp optimization
This fixes a test I introduced in change D59191 (that added src0 and
src1 modifiers to the v_cndmask instruction for disassembly purposes).
Spotted by David Binderman in bug 41488.
Differential Revision: https://reviews.llvm.org/D60652
Change-Id: I6ac95e66cd84e812ed3359ad57bcd0e13198ba0c
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358392
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeremy Morse [Mon, 15 Apr 2019 10:23:22 +0000 (10:23 +0000)]
[Docs] Switch a code block from LLVM to text
While I can't replicate this locally, it looks like the buildbots don't
recognize the IR block in r358385 l764 as IR. Downgrade it to being just
text while I look into it.
http://lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/30132
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358391
91177308-0d34-0410-b5e6-
96231b3b80d8
Thomas Preud'homme [Mon, 15 Apr 2019 10:10:11 +0000 (10:10 +0000)]
FileCheck [1/12]: Move variable table in new object
Summary:
This patch is part of a patch series to add support for FileCheck
numeric expressions. This specific patch adds a new class to hold
pattern matching global state.
The table holding the values of FileCheck variable constitutes some sort
of global state for the matching phase, yet is passed as parameters of
all functions using it. This commit create a new FileCheckPatternContext
class pointed at from FileCheckPattern. While it increases the line
count, it separates local data from global state. Later commits build
on that to add numeric expression global state to that class.
Copyright:
- Linaro (changes up to diff 183612 of revision D55940)
- GraphCore (changes in later versions of revision D55940 and
in new revision created off D55940)
Reviewers: jhenderson, chandlerc, jdenny, probinson, grimar, arichardson, rnk
Subscribers: hiraditya, llvm-commits, probinson, dblaikie, grimar, arichardson, tra, rnk, kristina, hfinkel, rogfer01, JonChesterfield
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60381
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358390
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Tatham [Mon, 15 Apr 2019 10:06:26 +0000 (10:06 +0000)]
[TableGen] Include schedule model name in diagnostic.
If you have more than one schedule model in your TableGen target
definitions, then the diagnostic "No schedule information for
instruction 'foo'" is rather unhelpful, because it doesn't tell you
_which_ schedule model is missing the necessary information (or, as it
might be, missing the UnsupportedFeatures definition that would stop
it thinking it needed it).
Extended the message to include the name of the schedule model that
it's complaining about.
Reviewers: nhaehnle, hfinkel, javedabsar, efriedma, javed.absar
Reviewed By: javed.absar
Subscribers: javed.absar, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60559
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358389
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeremy Morse [Mon, 15 Apr 2019 10:04:52 +0000 (10:04 +0000)]
[Docs] Correct some indentation muppetry that trips buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358388
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 10:02:36 +0000 (10:02 +0000)]
[DWARF] Fix DWARFVerifier::DieRangeInfo::contains
It didn't handle empty LHS correctly. If two ranges of LHS were
contiguous and jointly contained one range of RHS, it could also be incorrect.
DWARFAddressRange::contains can be removed and its tests can be merged into DWARFVerifier::DieRangeInfo::contains
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358387
91177308-0d34-0410-b5e6-
96231b3b80d8
Jeremy Morse [Mon, 15 Apr 2019 09:42:38 +0000 (09:42 +0000)]
[DebugInfo][Docs] Document variable location metadata transformations
This patch adds documentation explaining how variable location information is
compiled from the IR representation down to the end of the codegen pipeline,
but avoiding discussion of file formats and encoding.
This should make it clearer how the dbg.value / dbg.declare etc intrinsics
are transformed and arranged into DBG_VALUE instructions, and their meaning.
Differential Revision: https://reviews.llvm.org/D59790
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358385
91177308-0d34-0410-b5e6-
96231b3b80d8
Yevgeny Rouban [Mon, 15 Apr 2019 09:30:31 +0000 (09:30 +0000)]
Codegen: Fixed perf branch_weights in couple of tests. NFC.
This is need to pass future checks of perf branch_weights metadata.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358384
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 09:01:10 +0000 (09:01 +0000)]
Revert "[DWARF] Delete redundant check in DWARFAddressRange::intersects"
This reverts rL358377. It isn't redundant, though the semantic seems weird.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358381
91177308-0d34-0410-b5e6-
96231b3b80d8
Alexander Potapenko [Mon, 15 Apr 2019 08:59:56 +0000 (08:59 +0000)]
[Transforms][ASan] Move findAllocaForValue() to Utils/Local.cpp. NFC
Summary:
Factor out findAllocaForValue() from ASan so that we can use it in
MSan to handle lifetime intrinsics.
Reviewers: eugenis, pcc
Subscribers: hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60615
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358380
91177308-0d34-0410-b5e6-
96231b3b80d8
Serguei Katkov [Mon, 15 Apr 2019 08:57:53 +0000 (08:57 +0000)]
[NewPM] Add Option handling for SimplifyCFG
This patch enables passing options to SimplifyCFGPass via the passes pipeline.
Reviewers: chandlerc, fedor.sergeev, leonardchan, philip.pfaffe
Reviewed By: fedor.sergeev
Subscribers: llvm-commits
Differential Revision: https://reviews.llvm.org/D60675
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358379
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 08:36:21 +0000 (08:36 +0000)]
[DWARF] Delete redundant check in DWARFAddressRange::intersects
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358377
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 08:30:10 +0000 (08:30 +0000)]
[DWARF] Fix DWARFVerifier::DieRangeInfo::intersects
It was incorrect if RHS had more than 1 ranges and one of the ranges interacted with *this
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358376
91177308-0d34-0410-b5e6-
96231b3b80d8
Fangrui Song [Mon, 15 Apr 2019 07:40:30 +0000 (07:40 +0000)]
[DWARF] Make DWARFDebugLine::ParsingState::RowNumber a local variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358374
91177308-0d34-0410-b5e6-
96231b3b80d8
Bjorn Pettersson [Mon, 15 Apr 2019 07:19:11 +0000 (07:19 +0000)]
[SelectionDAG] Use KnownBits::computeForAddSub/computeForAddCarry
Summary:
Use KnownBits::computeForAddSub/computeForAddCarry
in SelectionDAG::computeKnownBits when doing value
tracking for addition/subtraction.
This should improve the precision of the known bits,
as we only used to make a simple estimate of known
zeroes. The KnownBits support functions are also
able to deduce bits that are known to be one in the
result.
Reviewers: spatel, RKSimon, nikic, lebedev.ri
Reviewed By: nikic
Subscribers: nikic, javed.absar, lebedev.ri, hiraditya, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D60460
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358372
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 15 Apr 2019 05:22:47 +0000 (05:22 +0000)]
[X86] Regenerate checks for domain-reassignment.mir
Apparently there are some stray IMPLICIT_DEF operations that weren't in the
checks. Not sure if they've always been there or something changed at some
point.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358371
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Lin [Mon, 15 Apr 2019 05:16:46 +0000 (05:16 +0000)]
[Sparc] Fix typo. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358370
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Mon, 15 Apr 2019 05:04:20 +0000 (05:04 +0000)]
[GlobalISel] Enable CSE in the IRTranslator & legalizer for -O0 with constants only.
Other opcodes shouldn't be CSE'd until we can be sure debug info quality won't
be degraded.
This change also improves the IRTranslator so that in most places, but not all,
it creates constants using the MIRBuilder directly instead of first creating a
new destination vreg and then creating a constant. By doing this, the
buildConstant() method can just return the vreg of an existing G_CONSTANT
instead of having to create a COPY from it.
I measured a 0.2% improvement in compile time and a 0.9% improvement in code
size at -O0 ARM64.
Compile time:
Program base cse diff
test-suite...ark/tramp3d-v4/tramp3d-v4.test 9.04 9.12 0.8%
test-suite...Mark/mafft/pairlocalalign.test 2.68 2.66 -0.7%
test-suite...-typeset/consumer-typeset.test 5.53 5.51 -0.4%
test-suite :: CTMark/lencod/lencod.test 5.30 5.28 -0.3%
test-suite :: CTMark/Bullet/bullet.test 25.82 25.76 -0.2%
test-suite...:: CTMark/ClamAV/clamscan.test 6.92 6.90 -0.2%
test-suite...TMark/7zip/7zip-benchmark.test 34.24 34.17 -0.2%
test-suite :: CTMark/SPASS/SPASS.test 6.25 6.24 -0.1%
test-suite...:: CTMark/sqlite3/sqlite3.test 1.66 1.66 -0.1%
test-suite :: CTMark/kimwitu++/kc.test 13.61 13.60 -0.0%
Geomean difference -0.2%
Code size:
Program base cse diff
test-suite...-typeset/consumer-typeset.test
1315632 1266480 -3.7%
test-suite...:: CTMark/ClamAV/clamscan.test
1313892 1297508 -1.2%
test-suite :: CTMark/lencod/lencod.test
1439504 1423112 -1.1%
test-suite...TMark/7zip/7zip-benchmark.test
2936980 2904172 -1.1%
test-suite :: CTMark/Bullet/bullet.test
3478276 3445460 -0.9%
test-suite...ark/tramp3d-v4/tramp3d-v4.test
8082868 8033492 -0.6%
test-suite :: CTMark/kimwitu++/kc.test
3870380 3853972 -0.4%
test-suite :: CTMark/SPASS/SPASS.test
1434904 1434896 -0.0%
test-suite...Mark/mafft/pairlocalalign.test 764528 764528 0.0%
test-suite...:: CTMark/sqlite3/sqlite3.test 782092 782092 0.0%
Geomean difference -0.9%
Differential Revision: https://reviews.llvm.org/D60580
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358369
91177308-0d34-0410-b5e6-
96231b3b80d8
Amara Emerson [Mon, 15 Apr 2019 04:53:46 +0000 (04:53 +0000)]
[GlobalISel] Introduce a CSEConfigBase class to allow targets to define their own CSE configs.
Because CodeGen can't depend on GlobalISel, we need a way to encapsulate the CSE
configs that can be passed between TargetPassConfig and the targets' custom
pass configs. This CSEConfigBase allows targets to create custom CSE configs
which is then used by the GISel passes for the CSEMIRBuilder.
This support will be used in a follow up commit to allow constant-only CSE for
-O0 compiles in D60580.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358368
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 14 Apr 2019 23:32:37 +0000 (23:32 +0000)]
llvm-undname: Fix oss-fuzz-foudn crash-on-invalid with incomplete special table nodes
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358367
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 14 Apr 2019 23:23:14 +0000 (23:23 +0000)]
gn build: Merge r358297
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358366
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 14 Apr 2019 23:21:58 +0000 (23:21 +0000)]
gn build: Merge r358243
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358365
91177308-0d34-0410-b5e6-
96231b3b80d8
Nico Weber [Sun, 14 Apr 2019 23:19:32 +0000 (23:19 +0000)]
gn build: Merge r358272
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358364
91177308-0d34-0410-b5e6-
96231b3b80d8