Commit Graph

163419 Commits

Author SHA1 Message Date
Craig Topper
6f6553e0da [AggressiveInstCombine] Add createAggressiveInstCombinerPass to LinkAllPasses.h.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330664 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-24 00:11:04 +00:00
Craig Topper
043b23526d [AggressiveInstCombine] Add library initializer routine for AggressiveInstCombine library. Use it in bugpoint and llvm-opt-fuzzer to match regular InstCombine.
This should make aggressive instcombine usable with these tools.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330663 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-24 00:05:21 +00:00
Simon Pilgrim
19c6b95399 [X86] Remove unnecessary vector memory folded InstRW overrides.
We have test coverage for these with resources-sse*/avx*

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330662 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 22:45:04 +00:00
Robert Widmann
bffba319b2 [LLVM-C] DIBuilder Bindings For Variable Expressions
Summary: Add DIBuilder bindings for (global) variable expressions, variable value expressions, and debug value intrinsic insertion.

Reviewers: harlanhaskins, deadalnix, whitequark

Reviewed By: whitequark

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330661 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 22:31:49 +00:00
Roman Tereshin
e55b052e03 [GlobalISel][Legalizer] Look thro copies while combining G_UNMERGE's
As we're becoming stricter w/ respect to not allowing vregs having LLTs
and regclasses assigned both mid-globalisel pipeline, the number of
extra copies grows, some of which separate G_UNMERGE's from their
corresponding G_MERGE's, becoming a performance concern.

It's worth mentioning that we're already looking through copies while
combining legalization artifacts for every kind of artifact but
G_UNMERGE.

Reviewed By: aditya_nandakumar

Reviewers: ab, t.p.northover, volkan, javed.absar

Subscribers: rovka, kristof.beyls, llvm-commits

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330660 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 22:28:36 +00:00
Simon Pilgrim
b344f5ad32 [X86] Remove unnecessary BMI2 InstRW overrides.
We have test coverage for these with resources-bmi2.s

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330659 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 22:19:55 +00:00
Florian Hahn
99abef011d [LoopInterchange] Do not change LI for BBs in child loops.
If a loop with child loops becomes our new inner loop after
interchanging, we only need to update LoopInfo for the blocks defined in
the old outer loop. BBs in child loops will stay there.

Reviewers: efriedma, karthikthecool, mcrosier

Reviewed By: efriedma

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330653 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 21:38:19 +00:00
Simon Pilgrim
0597a75372 [X86] Remove unnecessary WriteLEA InstRW overrides.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330648 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 21:04:23 +00:00
Roman Lebedev
04273076b9 [DAGCombiner] Unfold scalar masked merge if profitable
Summary:
This is [[ https://bugs.llvm.org/show_bug.cgi?id=37104 | PR37104 ]].

[[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]] will introduce an IR canonicalization that is likely bad for the end assembly.
Previously, `andl`+`andn`/`andps`+`andnps` / `bic`/`bsl` would be generated. (see `@out`)
Now, they would no longer be generated  (see `@in`).
So we need to make sure that they are still generated.

If the mask is constant, we do nothing. InstCombine should have unfolded it.
Else, i use `hasAndNot()` TLI hook.

For now, only handle scalars.

https://rise4fun.com/Alive/bO6

----

I *really* don't like the code i wrote in `DAGCombiner::unfoldMaskedMerge()`.
It is super fragile. Is there something like IR Pattern Matchers for this?

Reviewers: spatel, craig.topper, RKSimon, javed.absar

Reviewed By: spatel

Subscribers: andreadb, courbet, kristof.beyls, javed.absar, rengolin, nemanjai, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330646 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 20:38:49 +00:00
Roman Lebedev
ee05cadf69 [X86][AArch64][NFC] Add tests for masked merge unfolding
Summary:
This is [[ https://bugs.llvm.org/show_bug.cgi?id=37104 | PR37104 ]].

[[ https://bugs.llvm.org/show_bug.cgi?id=6773 | PR6773 ]] will introduce an IR canonicalization that is likely bad for the end assembly.
Previously, `andl`+`andn`/`andps`+`andnps` / `bic`/`bsl` would be generated. (see `@out`)
Now, they would no longer be generated  (see `@in`).
I'm guessing `llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp` should be able to unfold this.

Reviewers: spatel, craig.topper, RKSimon, javed.absar

Reviewed By: spatel

Subscribers: nemanjai, rengolin, javed.absar, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330645 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 20:38:42 +00:00
Sanjay Patel
b309972602 [AggressiveInstCombine] add tests for PR37098; NFC
I'm not sure if this is where we should try to fold these
patterns inspired by:
https://bugs.llvm.org/show_bug.cgi?id=37098
...if this isn't the right place, we can move the tests.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330642 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 20:20:32 +00:00
Xin Tong
7f02d6427a [CallSiteSplit] Make sure we remove nonnull if the parameter turns out to be a constant.
Summary: We do not need nonull attribute if we know an argument is going to be constant.

Reviewers: junbuml, davide, fhahn

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330641 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 20:09:08 +00:00
Gabor Buella
4dd24c474b [X86] Revert r330638 - accidental commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330640 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 20:05:51 +00:00
George Burgess IV
17e9db0c42 Fix a broken typedef; NFCI
Richard Smith noted that `typedef typename iplist::iplist_impl_type
iplist_impl_type` is incorrect, per
http://eel.is/c++draft/basic.scope#class-2

It seems that neither clang nor gcc get too angry about this, but a
newer version of msvc does.

Thanks to jcmac on IRC for pointing this out!


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330639 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 20:03:00 +00:00
Gabor Buella
abc9d03bfc [X86] movdiri and movdir64b instructions
Reviewers: craig.topper


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330638 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 20:00:59 +00:00
Bjorn Pettersson
dee6650968 [MemCpyOpt] Skip optimizing basic blocks not reachable from entry
Summary:
Skip basic blocks not reachable from the entry node
in MemCpyOptPass::iterateOnFunction.

Code that is unreachable may have properties that do not exist
for reachable code (an instruction in a basic block can for
example be dominated by a later instruction in the same basic
block, for example if there is a single block loop).
MemCpyOptPass::processStore is only safe to use for reachable
basic blocks, since it may iterate past the basic block
beginning when used for unreachable blocks. By simply skipping
to optimize unreachable basic blocks we can avoid asserts such
as "Assertion `!NodePtr->isKnownSentinel()' failed."
in MemCpyOptPass::processStore.

The problem was detected by fuzz tests.

Reviewers: eli.friedman, dneilson, efriedma

Reviewed By: efriedma

Subscribers: efriedma, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330635 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 19:55:04 +00:00
Sam Clegg
3f46946fed [WebAssembly] MC: Refactor section creation code
Remove the use of default argument in favor of a separate
startCustomSection method.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330632 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 19:16:19 +00:00
Quentin Colombet
f48113f0d5 [CODE_OWNERS] Update my email address.
NFC

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330631 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 19:09:49 +00:00
Peter Collingbourne
cebbb7c075 Reland r329956, "AArch64: Introduce a DAG combine for folding offsets into addresses.", with a fix for the bot failure.
This reland includes a check to prevent the DAG combiner from folding an
offset that is smaller than the existing one. This can cause oscillations
between two possible DAGs, which was the cause of the hang and later assertion
failure observed on the lnt-ctmark-aarch64-O3-flto bot.
http://green.lab.llvm.org/green/job/lnt-ctmark-aarch64-O3-flto/2024/

Original commit message:
> This is a code size win in code that takes offseted addresses
> frequently, such as C++ constructors that typically need to compute
> an offseted address of a vtable. This reduces the size of Chromium
> for Android's .text section by 108KB.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330630 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 19:09:34 +00:00
Daniel Neilson
6c92ba3e0b [DSE] Teach the pass that atomic memory intrinsics are stores.
Summary:
This change teaches DSE that the atomic memory intrinsics are stores
that can be eliminated, and can allow other stores to be eliminated.
This change specifically does not teach DSE that these intrinsics
can be partially eliminated (i.e. length reduced, and dest/src changed);
that will be handled in another change.

Reviewers: mkazantsev, skatkov, apilipenko, efriedma, rsmith

Reviewed By: efriedma

Subscribers: dmgreen, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330629 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 19:06:49 +00:00
Matthew Simpson
871b8fe06d [AArch64] Add cost model test case for transpose
This patch adds a cost model test case for vector shuffles having transpose
masks. The given costs are inaccurate and will be updated in a follow-on patch.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330625 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 18:21:29 +00:00
Alex Shlyapnikov
b6ec859b6c [HWASan] Switch back to fixed shadow mapping for x86-64
For now switch back to fixed shadow mapping for x86-64 due to the issues
with IFUNC linking on older binutils. More details will be added to
https://bugs.chromium.org/p/chromium/issues/detail?id=835864

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330623 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 18:14:39 +00:00
Craig Topper
14d8c6dfc0 [X86] Add disassembler test cases for bswap.
This demonstrates a bug where the encoding for a 16-bit bswap prints a 16-bit register and a 32-bit mnemonic. Intel docs say 16-bit bswap is undefined. We should either claim it as an invalid encoding or we should print a 16-bit mnemonic.

objdump does print the encoding as bswap with a 16-bit register. But it doesn't seem to ever print a suffix.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330621 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 17:47:33 +00:00
Vedant Kumar
aeb3e4fcbb [SelectionDAG] Dump debug locs in SDNodes
This helps debug issues where selection-dag assigns the wrong location
to an instruction.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330618 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 17:18:24 +00:00
Simon Pilgrim
c994340063 [MC] Remove MachineInstr reference in MC layer (PR37160)
Only add support for getSchedInfoStr(const MachineInstr &MI) at the TargetSubtargetInfo level.

Really, the getSchedInfoStr calls need to be removed entirely, we should just return a latency/rthroughput through the subtarget and keep a string creation helper function somewhere else.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330615 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 16:59:06 +00:00
Reid Kleckner
72775a354c Fix -Wtautological-compare warning with npos on Windows
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330614 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 16:47:27 +00:00
Matt Arsenault
8c0fb2c473 AMDGPU: Move a flawed assert when spilling SGPRs
It's possible to validly spill the frame offset register
in a call sequence to a VGPR. There are definitely issues
with SGPR spilling to memory, so move the assert later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330612 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 16:13:30 +00:00
Simon Pilgrim
c07c4e0298 [X86] Replace x87 instregex with instrs if they only match one instruction
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330611 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 16:10:50 +00:00
Adrian Prantl
48c9175fe5 Fix computeSymbolSizes SEGFAULT on invalid file
We use llvm-symbolizer in some production systems, and we run it
against all possibly related files, including some that are not
ELF. We noticed that for some of those invalid files, llvm-symbolizer
would crash with SEGFAULT. Here is an example of such a file.

It is due to that in computeSymbolSizes, a loop uses condition

  for (unsigned I = 0, N = Addresses.size() - 1; I < N; ++I) {

where if Addresses.size() is 0, N would overflow and causing the loop
to access invalid memory.

Instead of patching the loop conditions, the commit makes so that the
function returns early if Addresses is empty.

Validated by checking that llvm-symbolizer no longer crashes.

Patch by Teng Qin!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330610 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 16:08:01 +00:00
Matt Arsenault
7c20cc0669 AMDGPU: Assign enum name to stack ID
Also assert that it is correct for SGPRs. There is currently a bug
where stack slot coloring replaces SGPR spill FIs with one with
the default ID, which results in a more confusing assert later
about a dead object.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330607 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 15:51:26 +00:00
Matt Arsenault
9269b2bccb StackSlotColoring: Fix missing skipFunction check
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330606 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 15:51:21 +00:00
Daniel Neilson
91f2b63a06 [SelectionDAG] Refactor lowering of atomic memory intrinsics.
Summary:
This just refactors the lowering of the atomic memory intrinsics to more
closely match the code patterns used in the lowering of the non-atomic
memory intrinsics. Specifically, we encapsulate the lowering in
SelectionDAG::getAtomicMem*() functions rather than embedding
the code directly in the SelectionDAGBuilder code.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330603 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 15:40:37 +00:00
Robert Widmann
cd997a7a91 [LLVM-C] DIBuilderBindings for Subrange and Arrays
Summary: Move Go bindings for subranges and DINode arrays.

Reviewers: harlanhaskins, whitequark, deadalnix

Reviewed By: whitequark

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330594 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 14:29:33 +00:00
Nico Weber
5a0bf254ce Sort a target list a bit better.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330593 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 14:28:49 +00:00
Alexey Bataev
ec94ea919c [DEBUGINFO, NVPTX] Add the test for the debug info of the local
variables, NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330592 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 14:00:53 +00:00
Robert Widmann
2fbfc40760 [LLVM-C] Finish Up Scope Bindings
Summary: Adds bindings for Module and NameSpace scopes and LLVMDIBuilderCreateForwardDecl, a counterpart to LLVMDIBuilderCreateReplaceableCompositeType.

Reviewers: harlanhaskins, whitequark, deadalnix

Reviewed By: whitequark

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330591 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 13:51:43 +00:00
Marianne Mailhot-Sarrasin
75dd90ec3a [doc] Removed obsolete -count-aa from AliasAnalysis documentation
Summary:
This patch removes references to AliasAnalysisCounter pass from the AliasAnalysis documentation. That pass have been eliminated in 2015, at revision trunk@247167.

Reviewed By: hfinkel

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330590 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 13:45:28 +00:00
Simon Pilgrim
a5418594dc [X86] Remove instregex matching from CLAC/STAC.
Note - noticed this as the STAC case as it was unintentionally matching against *STACK* pseudo instructions.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330588 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 13:24:17 +00:00
Nico Weber
99e23bd0c8 List cpp file only once (was added in 147117 and 147117 as build fix each).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330587 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 13:11:51 +00:00
Nicolai Haehnle
3db53ca654 AMDGPU: Fix SDWA peephole for V_AND_B32
Summary:
Found by inspection. We care about the operand that *doesn't*
contain the immediate.

I believe this is currently not hit because we fold 0xff / 0xffff
immediates only later.

Change-Id: Ic3cf8538bc7da5eff3200d96eccf9d339e6345a7

Reviewers: arsenm, rampitec

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330586 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 13:06:03 +00:00
Nicolai Haehnle
ae99d3d94c AMDGPU: Fix a corner case crash in SIOptimizeExecMasking
Summary:
See the new test case; this is really unlikely to happen with real code,
but I ran into this while attempting to bugpoint-reduce a different issue.

Change-Id: I9ade1dc1aa8fd9c4d9fc83661d7b80e310b5c4a6

Reviewers: arsenm, rampitec

Subscribers: kzhuravl, wdng, yaxunl, dstuttard, tpr, t-tye, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330585 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 13:05:50 +00:00
Nico Weber
49621ae232 Consistently sort add_subdirectory calls in lib/Target/*/CMakeLists.txt
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330584 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 12:49:34 +00:00
Sander de Smalen
5f9640830b [AArch64][SVE] Asm: Support for contiguous, non-faulting LDNF1 (scalar+imm) load instructions
Reviewers: fhahn, rengolin, javed.absar, huntergr, SjoerdMeijer, t.p.northover, echristo, evandro

Reviewed By: rengolin

Subscribers: tschuett, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330583 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 12:43:19 +00:00
Max Kazantsev
7321142107 [LoopRotate] Fix incorrect SCEV invalidation in loop rotation
LoopRotate only invalidates innermost loops while the changes that it makes may
also affert any of this parents. With patch rL329047, SCEV becomes much smarter
about calculation of exit counts for outer loops, so we cannot assume that they are
not affected.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330582 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 12:33:31 +00:00
Simon Pilgrim
8922c10918 [X86] Remove unnecessary MMX reg-mem InstRW scheduler overrides.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330581 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 11:57:15 +00:00
Max Kazantsev
b66694ab52 [LoopUnroll] Fix potentially incorrect SCEV invalidation in UnrollRuntime
Current runtime unrolling invalidates parent loop saying that it might have changed
after the inner loop has changed, but it doesn't bother to do the same to its parents.
With patch rL329047, SCEV becomes much smarter about calculation of exit counts for
outer loops. We might need to invalidate not only the immediate parent, but also
any of its parents as well.

There is no clear evidence that there is some miscompile happening because of this
(at least I don't have such test), but the common sense says that the current code
is wrong.

Differential Revision: https://reviews.llvm.org/D45940
Reviewed By: chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330577 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 10:39:38 +00:00
Max Kazantsev
d356fd6732 [LoopSimplify] Fix incorrect SCEV invalidation
In the function `simplifyOneLoop` we optimistically assume that changes in the
inner loop only affect this very loop and have no impact on its parents. In fact,
after rL329047 has been merged, we can now calculate exit counts for outer
loops which may depend on inner loops. Thus, we need to invalidate all parents
when we do something to a loop.

There is an evidence of incorrect behavior of `simplifyOneLoop`: when we insert
`SE->verify()` check in the end of this funciton, it fails on a bunch of existing
test, in particular:

    LLVM :: Transforms/LoopUnroll/peel-loop-not-forced.ll
    LLVM :: Transforms/LoopUnroll/peel-loop-pgo.ll
    LLVM :: Transforms/LoopUnroll/peel-loop.ll
    LLVM :: Transforms/LoopUnroll/peel-loop2.ll

Note that previously we have fixed issues of this variety, see rL328483.
This patch makes this function invalidate the outermost loop properly.

Differential Revision: https://reviews.llvm.org/D45937
Reviewed By: chandlerc


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330576 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 10:32:37 +00:00
Simon Tatham
0a556c8c15 Fix BNF nits in TableGen language reference.
Summary:
In the course of writing an experimental ANTLR grammar based on this
document, I found three errors in the documented BNF:

SimpleValues of dag type are allowed to have no operands at all after
the initial DagArg specifying the operator. For example, the value
(outs) is extremely common in backends; an example in the test suite
is test/TableGen/AsmVariant.td line 30. But the BNF doesn't allow
DagArgList to expand to the empty string (it must contain at least one
DagArg), and therefore the DagArgList specifying the operands in the
dag-shaped production for SimpleValue should be optional.

In the production for BodyItem with a 'let' and an optional RangeList,
the RangeList should have braces around it if it's present, matching
code such as "let E{7-0} = ..." on test/TableGen/BitsInit.td line 42.
Those braces aren't included in the RangeList nonterminal itself, so
instead they need to be part of the optional segment of the BodyItem
production.

Finally, the identifier after 'defm' should be optional. Again, this
is very common in the real back end .td files; an example in the test
suite is in test/TableGen/defmclass.td line 49.

Reviewers: rengolin, nhaehnle, stoklund

Reviewed By: nhaehnle

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330570 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 09:15:47 +00:00
Simon Tatham
1b68b2eca5 Test commit access.
Should be a harmless trimming of trailing whitespace from a
documentation file.

(There are other instances of trailing whitespace in this file alone.
I've only fixed one of them, on the basis that that way the rest are
still available for other people's commit-access tests :-)


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330567 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 08:41:53 +00:00
Sander de Smalen
83cd5098e0 [AArch64][SVE] Asm: Support for structured ST2, ST3 and ST4 (scalar+imm) store instructions.
Reviewers: fhahn, rengolin, javed.absar, SjoerdMeijer, t.p.northover, echristo, evandro, huntergr

Reviewed By: rengolin

Subscribers: tschuett, kristof.beyls, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330565 91177308-0d34-0410-b5e6-96231b3b80d8
2018-04-23 07:50:35 +00:00