131103 Commits

Author SHA1 Message Date
Geoff Berry
4c9f41e56f [BasicAA] Treat llvm.assume as not accessing memory in getModRefBehavior(Function)
Reviewers: dberlin, chandlerc, hfinkel, reames, sanjoy

Subscribers: mcrosier, llvm-commits

Differential Revision: http://reviews.llvm.org/D19730

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268068 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 17:18:28 +00:00
Haicheng Wu
c4cd817ade [MBP] Split placement and alignment into two functions. NFC.
Cut and Paste.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268067 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 17:06:44 +00:00
Artem Tamazov
f3487e82c4 Fixed/Recommitted r267733 "[AMDGPU][llvm-mc] Add support of TTMP quads. Rework M0 exclusion for SMRD."
Previously reverted by r267752.

r267733 review:
Differential Revision: http://reviews.llvm.org/D19342

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268066 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 17:04:50 +00:00
Guozhi Wei
d707220214 [PPC] Enable shuffling of VSX vectors
This patch fixes PR27078 by enabling shuffling of vectors if VSX is available.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268064 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 17:00:54 +00:00
Amjad Aboud
2f41b0fa11 Fixed LIT tests that was broken after change in r268054.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268063 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 16:54:18 +00:00
Filipe Cabecinhas
034b92a7c3 Add operator- to Path's reverse_iterator. Needed for D19666
Reviewers: rafael, craig.topper, bogner

Subscribers: llvm-commits

Differential Revision: http://reviews.llvm.org/D19724

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268062 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 16:48:07 +00:00
Sanjay Patel
6881bc84c4 auto-generate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268061 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 16:39:37 +00:00
Sanjay Patel
f5874ed5da [InstCombine] add helper function for ICmp with constant canonicalization; NFCI
As suggested in http://reviews.llvm.org/D17859 , we should enhance this
to support vectors.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268059 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 16:22:25 +00:00
Daniel Sanders
334e32689e [mips][ias] Move createCpRestoreMemOp to MipsTargetStreamer. NFC.
Summary:
This removes the temporary call to isIntegratedAssemblerRequired() which was
added recently. It's effect is now acheived directly in the MipsTargetStreamer
hierarchy.

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

Differential Revision: http://reviews.llvm.org/D19715


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268058 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 16:16:49 +00:00
Krzysztof Parzyszek
7ec8f078dd Fix NDEBUG build: variables used only in debug code causing compile error
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268057 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 16:14:00 +00:00
Amjad Aboud
36853e8292 Recommitted r264280 "Supporting all entities declared in lexical scope in LLVM debug info."
After fixing PR26942 in r267004.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268054 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 16:07:55 +00:00
Simon Dardis
260e00965a [mips][FastISel] A store is not a load.
Correct trivial error. One of the failing tests from PR/27458.

Reviewers: dsanders, vkalintiris, mcrosier

Differential Review: http://reviews.llvm.org/D19726



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268053 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 16:07:47 +00:00
Simon Dardis
3cc6d4647c [PATCH] [mips] Fix forbidden slot hazard handling
MipsHazardSchedule has to determine what the next physical machine instruction
is to decide whether to insert a nop. In case where a branch with a forbidden
slot appears at the end of a basic block, first *real* instruction of the next
physical basic block was determined using getFirstNonDebugInstr().

Unfortunately this only considers DBG_VALUEs and not other transient opcodes
such as EHLABEL. As EHLABEL passes the SafeInForbiddenSlot predicate and the
instruction after the EHLABEL can be a CTI, we observed test failures in the
LNT testsuite.

Reviewers: dsanders

Differential Review: http://reviews.llvm.org/D19051



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268052 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 16:04:18 +00:00
Krzysztof Parzyszek
744cc49078 [Hexagon] Optimize addressing modes for load/store
Patch by Jyotsna Verma.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268051 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 15:49:13 +00:00
Filipe Cabecinhas
2fd54348ae Unify XDEBUG and EXPENSIVE_CHECKS (into the latter), and add an option to the cmake build to enable them.
Summary:
Historically, we had a switch in the Makefiles for turning on "expensive
checks". This has never been ported to the cmake build, but the
(dead-ish) code is still around.

This will also make it easier to turn it on in buildbots.

Reviewers: chandlerc

Subscribers: jyknight, mzolotukhin, RKSimon, gberry, llvm-commits

Differential Revision: http://reviews.llvm.org/D19723

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268050 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 15:22:48 +00:00
Tobias Grosser
55d3dc177e Remove leftover
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268049 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 15:08:05 +00:00
Tobias Grosser
a4c2f26e2e cmake: Set LINK_POLLY_INTO_TOOLS to ON (v2)
This is the second try. This time we disable this feature if no Polly checkout
is available. For this to work we need to check if tools/polly is present
early enough that our decision is known before cmake generates Config/config.h.

With Polly checked into LLVM it was since a long time possible to compile
clang/opt/bugpoint with Polly support directly linked in, instead of only
providing Polly as a separate loadable module. This commit switches the
default from providing Polly as a module to linking Polly into tools, such
that it becomes unnecessary to load the Polly module when playing with Polly.
Such configuration has shown a lot more convenient for day-to-day Polly use.

This change does not impact the default behavior of any tool, if Polly is not
explicitly enabled when calling clang/opt/bugpoint Polly does not affect
compilation.

This change also does not impact normal LLVM/clang checkouts that do not
contain Polly.

Reviewers: jdoerfert, Meinersbur

Subscribers: pollydev, llvm-commits

Differential Revision: http://reviews.llvm.org/D19711

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268048 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 15:07:22 +00:00
Sanjay Patel
432a66529d fix typo; NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268045 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 14:53:54 +00:00
Piotr Padlewski
dca9796216 Add credit [Test commit]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268044 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 14:52:12 +00:00
Tom Stellard
ac19ae8d63 AMDGPU/SI: Add offset field to ds_permute/ds_bpermute instructions
Summary:
These instructions can add an immediate offset to the address, like other
ds instructions.

Reviewers: arsenm

Subscribers: arsenm, scchan

Differential Revision: http://reviews.llvm.org/D19233

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268043 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 14:34:26 +00:00
Daniel Sanders
f4d5a508ae [mips][ias] Split expandMemInst between MipsAsmParser and MipsTargetStreamer. Almost NFC.
Summary:
The portion in MipsAsmParser is responsible for figuring out which expansion to
use, while the portion in MipsTargetStreamer is responsible for emitting it.

This allows us to remove the call to isIntegratedAssemblerRequired() which is
currently ensuring the effect of .cprestore only occurs when writing objects.

The small functional change is that the memory offsets are now correctly
printed as signed values.

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

Differential Revision: http://reviews.llvm.org/D19714


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268042 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 13:43:45 +00:00
Daniel Sanders
a0e83333a7 [mips][ias] Moved most instruction emission helpers to MipsTargetStreamer. NFC.
Summary:
* Moved all the emit*() helpers to MipsTargetStreamer.
* Moved createNop() to MipsTargetStreamer as emitNop() and emitEmptyDelaySlot().
  This instruction has been split to distinguish between the 'nop' instruction
  and the nop used in delay slots which is sometimes a different nop to the
  'nop' instruction (e.g. for short delay slots on microMIPS).
* Moved createAddu() to MipsTargetStreamer as emitAddu().
* Moved createAppropriateDSLL() to MipsTargetStreamer as emitDSLL().

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

Differential Revision: http://reviews.llvm.org/D19712

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268041 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 13:33:12 +00:00
Tobias Grosser
b5a82b6983 cmake: Fix grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268038 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 13:03:40 +00:00
Daniel Sanders
ae3740223b [mips][ias] Make section sizes a multiple of the alignment.
Reviewers: sdardis

Subscribers: dsanders, llvm-commits, sdardis

Differential Revision: http://reviews.llvm.org/D19008

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268036 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 12:44:07 +00:00
Tobias Grosser
931826ba5d Revert "cmake: Set LINK_POLLY_INTO_TOOLS to ON"
This reverts commit r268033 as it breaks some buildbots.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268035 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 12:38:24 +00:00
Tobias Grosser
4d75ec97c6 cmake: Set LINK_POLLY_INTO_TOOLS to ON
With Polly checked into LLVM it was since a long time possible to compile
clang/opt/bugpoint with Polly support directly linked in, instead of only
providing Polly as a separate loadable module. This commit switches the
default from providing Polly as a module to linking Polly into tools, such
that it becomes unnecessary to load the Polly module when playing with Polly.
Such configuration has shown a lot more convenient for day-to-day Polly use.

This change does not impact the default behavior of any tool, if Polly is not
explicitly enabled when calling clang/opt/bugpoint Polly does not affect
compilation.

This change also does not impact normal LLVM/clang checkouts that do not
contain Polly.

Reviewers: jdoerfert, Meinersbur, sebpop, etherzhhb, zinob, hiraditya

Subscribers: pollydev, llvm-commits

Differential Revision: http://reviews.llvm.org/D19711

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268033 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 12:23:11 +00:00
Simon Pilgrim
ea52c95508 [InstCombine][SSE] Added x86 pshufb undef mask tests
FIXME: We currently don't support folding constant pshufb shuffle masks containing undef elements.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268016 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 09:13:53 +00:00
Nikolay Haustov
02cd01c121 AMDGPU/SI: Assembler: Unify parsing/printing of operands.
Summary:
The goal is for each operand type to have its own parse function and
at the same time share common code for tracking state as different
instruction types share operand types (e.g. glc/glc_flat, etc).

Introduce parseAMDGPUOperand which can parse any optional operand.
DPP and Clamp/OMod have custom handling for now. Sam also suggested
to have class hierarchy for operand types instead of table. This
can be done in separate change.

Remove parseVOP3OptionalOps, parseDS*OptionalOps, parseFlatOptionalOps,
parseMubufOptionalOps, parseDPPOptionalOps.
Reduce number of definitions of AsmOperand's and MatchClasses' by using common base class.
Rename AsmMatcher/InstPrinter methods accordingly.
Print immediate type when printing parsed immediate operand.
Use 'off' if offset/index register is unused instead of skipping it to make it more readable (also agreed with SP3).
Update tests.

Reviewers: tstellarAMD, SamWot, artem.tamazov

Subscribers: qcolombet, arsenm, llvm-commits

Differential Revision: http://reviews.llvm.org/D19584

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268015 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 09:02:30 +00:00
Simon Pilgrim
63d2ca4a73 [InstCombine][SSE] Regenerated x86 pshufb tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268014 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 08:53:35 +00:00
Zlatko Buljan
951fe566b4 [mips][microMIPS] Fix offsets for LLE, LWE, SBE, SCE and SHE instructions
Differential Revision: http://reviews.llvm.org/D18645


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268012 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 08:36:54 +00:00
David Majnemer
3047183427 [GlobalOpt] Propagate operand bundles
We neglected to transfer operand bundles for some transforms.  These
were found via inspection, I'll try to come up with some test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268011 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 08:07:22 +00:00
David Majnemer
1929f2aa4d [InstCombine] Propagate operand bundles
We neglected to transfer operand bundles for some transforms.  These
were found via inspection, I'll try to come up with some test cases.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268010 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 08:07:20 +00:00
David Majnemer
1766d67d13 [DeadArgumentElimination] Propagate operand bundles to promoted call sites
We neglected to transfer operand bundles when performing argument
promotion.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268008 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 07:22:36 +00:00
Adam Nemet
7ea09d54b5 [LoopDist] Add missing RUN line in test from r268006
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268007 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 07:16:00 +00:00
Adam Nemet
4d336bd208 [LoopDist] Also emit optimization remark on success (-Rpass=)
The option -Rpass=loop-distribute now reports the loops that were
distributed.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268006 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 07:10:46 +00:00
Adam Nemet
dcfb1a65ad [LoopDist] Pass 'Function' to main class. NFC
Next patch will add another use for 'Function' inside the class.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268005 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 07:10:39 +00:00
David Majnemer
419fc9c644 [SLPVectorizer] Add operand bundles to vectorized functions
SLPVectorizing a call site should result in further propagation of its
bundles.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268004 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 07:09:51 +00:00
David Majnemer
a89ddf6e7c [LoopVectorize] Add operand bundles to vectorized functions
Also, do not crash when calculating a cost model for loop-invariant
token values.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268003 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 07:09:48 +00:00
Matt Arsenault
0638337d10 AMDGPU: Stop reporting an addressing mode for unknown addrspace
This was being treated the same as private, which has an immediate
offset. For unknown, it probably means it's for a computation not
actually being used for accessing memory, so it should not have a
nontrivial addressing mode.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268002 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 06:25:10 +00:00
Matt Arsenault
e8448abead DivergenceAnalysis: Fix crash with unreachable blocks
Unreachable blocks may not be in the dominator tree,
so don't crash on them.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@268001 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 06:17:47 +00:00
David Majnemer
e73d0289be [ArgumentPromotion] Propagate operand bundles to promoted call sites
We neglected to transfer operand bundles when performing argument
promotion.

This fixes PR27568.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267986 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 04:56:12 +00:00
Craig Topper
47c8c93e3d [X86] Remove unnecessary header file containing a small class. It was only included in one place. Just define the class directly in the cpp file. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267985 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 04:22:28 +00:00
Craig Topper
d2dec3c92c [X86] Include X86MCTargetDesc.h directly in X86Disassembler.cpp instead of duplicating parts of it. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267984 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 04:22:26 +00:00
Michael Zolotukhin
bf6113b8c0 [PR25281] Remove AAResultsWrapper from preserved analyses of loop vectorizer.
We don't preserve AAResults, because, for one, we don't preserve SCEV-AA.
That fixes PR25281.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267980 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 03:31:25 +00:00
Sanjoy Das
f828c4b375 Remove stale documentation on -no-aa
The pass itself was removed in rL247167.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267978 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 03:01:49 +00:00
Matthias Braun
e39fb36a01 RegisterPressure: Fix default lanemask for missing regunit intervals
In case of missing live intervals for a physical registers
getLanesWithProperty() would report 0 which was not a safe default in
all situations. Add a parameter to pass in a safe default.
No testcase because in-tree targets do not skip computing register unit
live intervals.

Also cleanup the getXXX() functions to not perform the
RequireLiveIntervals checks anymore so we do not even need to return
safe defaults.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267977 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 02:44:54 +00:00
Matthias Braun
aa3233ba4b RegisterPressure: Cannot produce dead (subregister) defs anymore
With the DetectDeadLanes pass in place we cannot run into situations
anymore where defs suddenly become dead.
Also add a missing check so we do not try to add an undef flag to a
physreg (found by visual inspection, no failing test).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267976 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 02:44:48 +00:00
Ivan Krasin
0222d5b54d Fix build by casting to the proper int type.
Reviewers: eugenis

Differential Revision: http://reviews.llvm.org/D19706

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267974 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 02:09:57 +00:00
Vedant Kumar
17d25e3044 [llvm-cov] Don't emit 'nan%' in reports
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267971 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 01:31:49 +00:00
Hal Finkel
8628001526 [LoopVectorize] Keep hints from original loop on the vector loop
We need to keep loop hints from the original loop on the new vector loop.
Failure to do this meant that, for example:

  void foo(int *b) {
  #pragma clang loop unroll(disable)
    for (int i = 0; i < 16; ++i)
      b[i] = 1;
  }

this loop would be unrolled. Why? Because we'd vectorize it, thus dropping the
hints that unrolling should be disabled, and then we'd unroll it.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267970 91177308-0d34-0410-b5e6-96231b3b80d8
2016-04-29 01:27:40 +00:00