Commit Graph

185227 Commits

Author SHA1 Message Date
Petr Hosek
7ce325b60c Move DK_Misexpect for compatability with getNextAvailablePluginDiagnosticKind
First identified after D66324 landed.

Patch By: paulkirth
Differential Revision: https://reviews.llvm.org/D67648

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372136 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 16:27:36 +00:00
Greg Clayton
d4f9d51f7e GSYM: add encoding and decoding to FunctionInfo
This patch adds encoding and decoding of the FunctionInfo objects along with full error handling and tests. Full details of the FunctionInfo encoding format appear in the FunctionInfo.h header file.

Differential Revision: https://reviews.llvm.org/D67506



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372135 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 16:15:49 +00:00
David Green
fa16ddf26f [ARM] Add a SelectTAddrModeImm7 for MVE narrow loads and stores
We were previously using the SelectT2AddrModeImm7 for both normal and narrowing
MVE loads/stores. As the narrowing instructions do not accept sp as a register,
it makes little sense to optimise a FrameIndex into the load, only to have to
recover that later on. This adds a SelectTAddrModeImm7 which does not do that
folding, and uses it for narrowing load/store patterns.

Differential Revision: https://reviews.llvm.org/D67489


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372134 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 15:32:28 +00:00
David Green
f6b2271403 [ARM] Fixup pipeline test. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372133 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 15:25:24 +00:00
David Green
c399770b5c [ARM] Reserve an emergency spill slot for fp16 addressing modes that need it
Similar to D67327, but this time for the FP16 VLDR and VSTR instructions that
use the AddrMode5FP16 addressing mode. We need to reserve an emergency spill
slot for instructions that will be out of range to use sp directly.
AddrMode5FP16 is 8 bits with a scale of 2.

Differential Revision: https://reviews.llvm.org/D67483


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372132 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 15:23:09 +00:00
Benjamin Kramer
407502440c [RISCV] Unbreak the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372127 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 14:27:31 +00:00
Sam Parker
f4c9416b67 [ARM] Fix for buildbots
Remove setPreservesCFG from ARMConstantIslandPass and add a couple
of -verify-machine-dom-info instances into the existing codegen
tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372126 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 14:21:36 +00:00
Krasimir Georgiev
d5f8516fb7 Revert "[SLC] Preserve attrs for strncpy(x, "", y) -> memset(align 1 x, '\0', y)"
Summary:
This reverts commit r372101.

Causes ASAN build bot failures:

http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/14176
From http://lab.llvm.org:8011/builders/sanitizer-ppc64be-linux/builds/14176/steps/64-bit%20check-asan/logs/stdio:

```
[ RUN      ] AddressSanitizer.StrNCatOOBTest
/home/buildbots/ppc64be-sanitizer/sanitizer-ppc64be/build/llvm-project/compiler-rt/lib/asan/tests/asan_str_test.cpp:462: Failure
Death test: strncat(to - 1, from, 0)
    Result: failed to die.
```

Subscribers: llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67658

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372125 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 14:15:23 +00:00
Nico Weber
7166e93a27 gn build: (manually) merge r372076
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372123 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 14:06:05 +00:00
George Rimar
95e4c59cb3 [llvm-readobj/llvm-objdump] - Improve how tool locate the dynamic table and report warnings about that.
Before this patch we gave a priority to a dynamic table found
from the section header.

It was discussed (here: https://reviews.llvm.org/D67078?id=218356#inline-602082)
that probably preferring the table from PT_DYNAMIC is better,
because it is what runtime loader sees.

This patch makes the table from PT_DYNAMIC be chosen at first place if it is available.
But also it adds logic to fall back to SHT_DYNAMIC if the table from the dynamic segment is
broken or fall back to use no table if both are broken.

It adds a few more diagnostic warnings for the logic above.

Differential revision: https://reviews.llvm.org/D67547

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372122 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 13:58:46 +00:00
Sam Parker
ec6d4897ce [ARM] Fix for buildbots
Add --verifymachineinstrs and update the remaining low overhead loop
tests.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372121 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 13:46:26 +00:00
Luis Marques
29210e68f6 [RISCV][NFC] Use NoRegister instead of 0 literal
Summary: Trivial cleanup.

Reviewers: asb, lenary

Reviewed By: lenary

Subscribers: hiraditya, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, kito-cheng, shiva0217, jrtc27, MaskRay, zzheng, edward-jones, rogfer01, MartinMosbeck, brucehoult, the_o, rkruppe, PkmX, jocewei, psnobl, benna, Jim, s.egerton, pzheng, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67526

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372120 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 13:34:17 +00:00
Simon Pilgrim
65c71da7ab [X86] X86DAGToDAGISel::tryFoldLoad - assert root/parent pointers are non-null. NFCI.
Silences a static analyzer warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372118 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 13:27:02 +00:00
Simon Pilgrim
3ea033d82c InterleavedAccessInfo - Don't dereference a dyn_cast result. NFCI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372117 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 13:25:56 +00:00
Simon Pilgrim
f2aa921cfe [LoopVectorize] Don't dereference a dyn_cast result. NFCI.
The static analyzer is warning about potential null dereferences of dyn_cast<> results, we can use cast<> directly as we know that these cases should all be CastInst, which is why its working atm and anyway cast<> will assert if they aren't.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372116 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 13:24:54 +00:00
David Green
59654524ce [ARM] Fix for MVE load/store stack accesses
MVE loads and stores have a 7 bit immediate range, scaled by the length of the type. This needs to be taught to the stack estimation code to ensure that an emergency spill slot is reserved in case we run out of registers when materialising stack indices.

Also the narrowing loads/stores can be created with frame indices even though they do not accept SP as a register. We need in those cases to make sure we have an emergency register to use as the frame base, as SP can never be used.

Differential Revision: https://reviews.llvm.org/D67327


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372114 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 12:58:51 +00:00
Benjamin Kramer
1d7df59e12 Hide implementation details in namespaces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372113 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 12:56:29 +00:00
Sam Parker
81c57d04ce [ARM][LowOverheadLoops] Add LR def safety check
Converting the *LoopStart pseudo instructions into DLS/WLS results in
LR being defined. These instructions were inserted on the assumption
that LR would already contain the loop counter because a mov is
introduced during ISel as the the consumers in the loop can only use
LR. That assumption proved wrong!

So perform a safety check, finding an appropriate place to insert the
DLS/WLS instructions or revert if this isn't possible.

Differential Revision: https://reviews.llvm.org/D67539

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372111 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 12:19:32 +00:00
George Rimar
5ca1bec788 [llvm-readobj] - Test PPC64 relocations properly.
We had a precompiled binary committed and not all of the relocations
supported were tested. This patch fixes this.

Differential revision: https://reviews.llvm.org/D67617

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372110 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 12:05:39 +00:00
George Rimar
beff567c6d [obj2yaml] - Support PPC64 relocation types.
We do not support them and fail with llvm_unreachable currently.
This is not the only target we do not support and also seems we are missing
the tests for those we have already. But I needed this one for another patch,
so posted it separatelly.

Relocation names are taken from llvm\include\llvm\BinaryFormat\ELFRelocs\PowerPC64.def

Differential revision: https://reviews.llvm.org/D67615

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372109 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 12:00:55 +00:00
George Rimar
d81d976861 [yaml2obj/obj2yaml] - Allow setting an arbitrary values for e_machine.
Currently we only allow using a known named constants
for `Machine` field in YAML documents.

This patch allows using any numbers (valid or "unknown")
and adds test cases for current and new functionality.

With this it is possible to write a test cases for really unknown
EM_* targets.

Differential revision: https://reviews.llvm.org/D67652

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372108 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 11:51:26 +00:00
James Henderson
e2fbdd44a6 [docs] Make --version text more correct
Follow-up to r371983. Referring to "this program" in the description of
the --version option in the documentation isn't exactly correct, because
the docs are not part of the program, and so "this program" doesn't
really refer to anything. This patch brings the other users of this
terminology into line with the new updates to llvm-size and
llvm-strings.

Reviewed by: alexshap, MaskRay

Differential Revision: https://reviews.llvm.org/D67618

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372107 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 11:43:42 +00:00
Luis Marques
85abf858b2 [RISCV] Switch to the Machine Scheduler
Most of the test changes are trivial instruction reorderings and differing
register allocations, without any obvious performance impact.

Differential Revision: https://reviews.llvm.org/D66973

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372106 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 11:15:35 +00:00
Johannes Doerfert
80781fec87 [Attributor][Fix] Initialize the cache prior to using it
Summary:
There were segfaults as we modified and iterated the instruction maps in
the cache at the same time. This was happening because we created new
instructions while we populated the cache. This fix changes the order
in which we perform these actions. First, the caches for the whole
module are created, then we start to create abstract attributes.

I don't have a unit test but the LLVM test suite exposes this problem.

Reviewers: uenoku, sstefan1

Subscribers: hiraditya, bollu, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67232

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372105 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 10:52:41 +00:00
Luis Marques
3049bc0fef Revert Patch from Phabricator
This reverts r372092 (git commit e38695a0255c9e7b53639f349f8101bae1ce5c04)

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372104 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 10:52:09 +00:00
Simon Pilgrim
e1592a6777 [X86] Use APInt::getLowBitsSet helper. NFCI.
Also avoids a static analyzer warning about out of range shifts.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372103 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 10:51:30 +00:00
David Bolvansky
d15afd3638 [SLC] Preserve attrs for strncpy(x, "", y) -> memset(align 1 x, '\0', y)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372101 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 10:25:38 +00:00
Graham Hunter
464b4d0dfb [SVE][MVT] Fixed-length vector MVT ranges
* Reordered MVT simple types to group scalable vector types
    together.
  * New range functions in MachineValueType.h to only iterate over
    the fixed-length int/fp vector types.
  * Stopped backends which don't support scalable vector types from
    iterating over scalable types.

Reviewers: sdesmalen, greened

Reviewed By: greened

Differential Revision: https://reviews.llvm.org/D66339


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372099 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 10:19:23 +00:00
David Bolvansky
d4e3b6ef79 [InstCombine] Annotate strdup with deref_or_null
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372098 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 10:12:48 +00:00
David Bolvansky
f0f4b7afaa [NFCI] Fixed buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372097 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 10:03:45 +00:00
Fangrui Song
2920626e02 [SimplifyLibCalls] Fix -Wunused-result after D53342/r372091
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372096 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:56:55 +00:00
David Bolvansky
b52cac3f40 [NFC} Updated test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372093 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:45:52 +00:00
Luis Marques
955b80686a Patch from Phabricator
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372092 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:43:08 +00:00
David Bolvansky
077e4d5d58 [SimplifyLibCalls] Mark known arguments with nonnull
Reviewers: efriedma, jdoerfert

Reviewed By: jdoerfert

Subscribers: ychen, rsmith, joerg, aaron.ballman, lebedev.ri, uenoku, jdoerfert, hfinkel, javed.absar, spatel, dmgreen, llvm-commits

Differential Revision: https://reviews.llvm.org/D53342

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372091 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:32:52 +00:00
George Rimar
561e3dc589 [llvm-readobj] - Fix BB after r372087.
Seems I forgot to update the number of bytes checked.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372089 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:26:49 +00:00
Fangrui Song
61474b8c87 [llvm-ar] Parse 'h' and '-h': display help and exit
Support `llvm-ar h` and `llvm-ar -h` because they may be what users try
at first. Note, operation 'h' is undocumented in GNU ar.

Reviewed By: jhenderson

Differential Revision: https://reviews.llvm.org/D67560

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372088 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:25:52 +00:00
George Rimar
efc29761d1 [llvm-readobj] - Fix a TODO in elf-reloc-zero-name-or-value.test.
The "TODO" mentioned was:

"Add test for symbol with no name but with a value once yaml2obj allows
referencing symbols with no name from relocations."

We can do it now.

Differential revision: https://reviews.llvm.org/D67609

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372087 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:12:10 +00:00
Alexander Timofeev
7ae04842e0 [AMDGPU]: PHI Elimination hooks added for custom COPY insertion. Fixed
Defferential Revision: https://reviews.llvm.org/D67101

Reviewers: rampitec, vpykhtin

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372086 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:08:58 +00:00
Sam Parker
1bff644c7f [ARM] LE support in ConstantIslands
The low-overhead branch extension provides a loop-end 'LE' instruction
that performs no decrement nor compare, it just jumps backwards. This
patch modifies the constant islands pass to try to insert LE
instructions in place of a Thumb2 conditional branch, instead of
shrinking it. This only happens if a cmp can be converted to a cbn/z
and used to exit the loop.

Differential Revision: https://reviews.llvm.org/D67404

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372085 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:08:05 +00:00
Florian Hahn
bac41ae77d [LoopUnroll] Use LoopSize+1 as threshold, to allow unrolling loops matching LoopSize.
We use `< UP.Threshold` later on, so we should use LoopSize + 1, to
allow unrolling if the result won't exceed to loop size.

Fixes PR43305.

Reviewers: efriedma, dmgreen, paquette

Reviewed By: dmgreen

Differential Revision: https://reviews.llvm.org/D67594

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372084 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 09:02:48 +00:00
George Rimar
18f599f81e [llvm-readobj] - Refactor the code.
It's a straightforward refactoring that allows to simplify and encapsulate the code.

Differential revision: https://reviews.llvm.org/D67624

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372083 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 08:53:18 +00:00
George Rimar
fa96672181 [llvm-objcopy] - Remove python invocations from 2 test cases.
It is possible to use yaml2obj to create sections with overlapping sh_offset now.
This patch does that.

Differential revision: https://reviews.llvm.org/D67610

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372081 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 08:38:53 +00:00
Florian Hahn
0facd33f64 [bugpoint] Add support for -Oz and properly enable -Os.
This patch adds -Oz as option and also properly enables support for -Os.
Currently, the existing check for -Os is dead, because the enclosing if
only checks of O1, O2 and O3.

There is still a difference between the -Oz pipeline compared to opt,
but I have not been able to track that down yet.

Reviewers: bogner, sebpop, efriedma

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D67593

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372079 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 08:14:09 +00:00
Sam Parker
9cbd8cbe11 [ARM][MVE] Add invalidForTailPredication to TSFlags
Set this bit for the MVE reduction instructions to prevent a loop from
becoming tail predicated in their presence.

Differential Revision: https://reviews.llvm.org/D67444

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372076 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 07:43:04 +00:00
Hideto Ueno
f6a402010b [Attributor] Use Alias Analysis in noalias callsite argument deduction
Summary: This patch adds a check of alias analysis in `noalias` callsite argument deduction.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67604

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372075 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 06:53:27 +00:00
Hideto Ueno
8a6eaada3c [Attributor] Create helper struct for handling analysis getters
Summary: This patch introduces a helper struct `AnalysisGetter` to put together analysis getters. In this patch, a getter for `AAResult` is also added for  `noalias`.

Reviewers: jdoerfert, sstefan1

Reviewed By: jdoerfert

Subscribers: hiraditya, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D67603

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372072 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 05:45:18 +00:00
David Zarzycki
117bbfcff2 [git-llvm] Do not reinvent @{upstream} (take 2)
This makes git-llvm more of a thin wrapper around git while temporarily
maintaining backwards compatibility with past git-llvm behavior.

Using @{upstream} makes git-llvm more robust when used with a nontrivial
local repository.

https://reviews.llvm.org/D67389

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372070 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 04:44:13 +00:00
Craig Topper
e22e82f8d9 [X86] Split oversized vXi1 vector arguments and return values into scalars on avx512 targets.
Previously we tried to split them into narrower v64i1 or v16i1
pieces that each got promoted to vXi8 and then passed in a zmm
or xmm register. But this crashes when you need to pass more
pieces than available registers reserved for argument passing.

The scalarizing done here generates much longer and slower code,
but is consistent with the behavior of avx2 and earlier targets
for these types.

Fixes PR43323.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372069 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 04:41:14 +00:00
Craig Topper
61044921b4 [X86] Allow masked VBROADCAST instructions to be turned into BLENDM with a broadcast load to avoid a copy.
The BLENDM instructions allow an 2 sources and an independent
destination while masked VBROADCAST has the destination tied
to the source.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372068 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 04:41:10 +00:00
Craig Topper
878e3df175 [X86] Add support for commuting EVEX VCMP instructons with any immediate value.
Previously we limited to the EQ/NE/TRUE/FALSE/ORD/UNORD immediates.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@372067 91177308-0d34-0410-b5e6-96231b3b80d8
2019-09-17 04:41:05 +00:00