136128 Commits

Author SHA1 Message Date
Bernard Ogden
921ae8e295 [ARM] Some saturation instructions not DSP-only
Summary:
Commit 276701 requires that targets have the DSP extensions to use
certain saturating instructions. This requires some corrections.

For ARM ISA the instructions in question are available in all v6*
architectures.

For Thumb2, the instructions in question are available from v6T2.
SSAT and USAT are part of the base architecture while SSAT16 and
USAT16 require the DSP extensions.

Reviewers: rengolin

Subscribers: aemerson, rengolin, samparker, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277439 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 10:04:03 +00:00
Benjamin Kramer
df988869b8 [LoadStoreVectorizer] Don't use a linear walk for an existence check in a SmallPtrSet
No functionality change intended.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277436 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 09:35:17 +00:00
Igor Breger
0691cf23e8 [AVX512] Don't use i128 masked gather/scatter/load/store. Do more accurately dataWidth check.
Differential Revision: http://reviews.llvm.org/D23055

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277435 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 09:15:28 +00:00
Matt Arsenault
3638aecf0f AArch64: Assert on branch displacement bits
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277434 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 08:56:52 +00:00
Matt Arsenault
08fb6f0810 AArch64: Consolidate branch inversion logic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277431 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 08:30:06 +00:00
Matt Arsenault
1cee04d59a AArch64: BranchRelaxtion cleanups
Move some logic into TII.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277430 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 08:06:17 +00:00
Matt Arsenault
5d4d2680c1 AArch64: Add missing branch relaxation tests
The branch relaxation pass has the worst test coverage
of any pass in AArch64. Add a few tests that hit some
large pieces of code in the pass.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277428 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 07:41:05 +00:00
Matt Arsenault
c2fcbdb2b3 AArch64: Fix end iterator dereference
Not all blocks have terminators. I'm not sure how this wasn't
crashing before.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277427 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 07:20:09 +00:00
Craig Topper
a99d4e1d68 [AVX-512] Mark VADDPS/PD and VMULPS/PD as commutable. This necessitated adding itineraries to all of the instructions that use the avx512_fp_binop_p class.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277422 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 06:16:53 +00:00
Craig Topper
8d6665d783 [AVX-512] Use SSE_MUL_ITINS_S/SSE_DIV_ITINS_S for the scalar FMUL/FDIV instructions to match SSE/AVX.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277421 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 06:16:51 +00:00
Chandler Carruth
c9e642268a [Inliner] Clean up doxygen comments to match modern style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277417 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 05:49:32 +00:00
Craig Topper
7a4565f0eb [AVX-512] Correct ExeDomain for many AVX-512 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277416 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 05:11:15 +00:00
Junmo Park
f29090aa9b Minor code cleanups. NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277415 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 04:38:27 +00:00
Sanjoy Das
f21ab36404 [Verifier] Improve test coverage for rL277413
As suggest via post-commit review.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277414 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 03:23:22 +00:00
Sanjoy Das
308cf93891 [Verifier] Disallow illegal ptr<->int casts in ConstantExprs
This should have been a part of rL277085, but I hadn't considered this
case.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277413 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 02:55:57 +00:00
Bruno Cardoso Lopes
b1fa8fe727 Revert r277408 and r277407
Revert r277408 "Fix test from rL277407."
Revert r277407 "[MC] Fix handling of end-of-line preprocessor comments"

This is currently breaking:
  http://lab.llvm.org:8080/green/job/clang-stage1-configure-RA_check/20731

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277412 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 02:53:59 +00:00
Sean Silva
e9e07465ef CodeExtractor : Add ability to preserve profile data.
Added ability to estimate the entry count of the extracted function and
the branch probabilities of the exit branches.

Patch by River Riddle!

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277411 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 02:15:45 +00:00
Sanjoy Das
81274146ab Tie the Verifier class to a Module; NFCI
Summary:
This commit changes the Verifier class to accept a Module via the
constructor to make it obvious that a specific instance of the class is
only intended to work with a specific module.  The `updateModule` setter
(despite being private) was making this fact less transparent.

There are fields in the `Verifier` class like `DeoptimizeDeclarations`
and `GlobalValueVisited` which are module specific, so a given
Verifier instance will not in fact work across multiple modules today.
This change just makes that more obvious.

The motivation is to make it easy to get to the datalayout of the
module unambiguously.  That is required to verify that `inttoptr` and
`ptrtoint` constant expressions are well typed in the face of
non-integral pointer types.

Reviewers: dexonsmith, bkramer, majnemer, chandlerc

Subscribers: mehdi_amini, mcrosier, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277409 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 01:34:50 +00:00
Nirav Dave
e9cc165371 Fix test from rL277407.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277408 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 01:27:09 +00:00
Nirav Dave
6fc4119b60 [MC] Fix handling of end-of-line preprocessor comments
Summary:
When parsing assembly where the line comment syntax is not hash, the
lexer cannot distinguish between hash's that start a hash line comment
and one that is part of an assembly statement and must be distinguished
during parsing. Previously, this was incompletely handled by not checking
for EndOfStatement at the end of statements and interpreting hash
prefixed statements as comments.

Change EndOfStatement Parsing to check for Hash comments and reintroduce
Hash statement parsing to catch previously handled cases.

Reviewers: rnk, majnemer

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277407 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-02 01:05:29 +00:00
Hans Wennborg
0e6a15a292 Revert r276895 "[MC][X86] Fix Intel Operand assembly parsing for .set ids"
This caused PR28805. Adding a regression test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277402 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 23:00:01 +00:00
Tim Shen
a9ed4cc01c [ADT] NFC: Generalize GraphTraits requirement of "NodeType *" in interfaces to "NodeRef", and migrate SCCIterator.h to use NodeRef
Summary: By generalize the interface, users are able to inject more flexible Node token into the algorithm, for example, a pair of vector<Node>* and index integer. Currently I only migrated SCCIterator to use NodeRef, but more is coming. It's a NFC.

Reviewers: dblaikie, chandlerc

Subscribers: llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277399 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 22:32:20 +00:00
Derek Schuff
23429a5af3 [WebAssembly] Support CFI for WebAssembly target
Summary: This patch implements CFI for WebAssembly. It modifies the
LowerTypeTest pass to pre-assign table indexes to functions that are
called indirectly, and lowers type checks to test against the
appropriate table indexes. It also modifies the WebAssembly backend to
support a special ".indidx" assembly directive that propagates the table
index assignments out to the linker.

Patch by Dominic Chen

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277398 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 22:25:02 +00:00
Lang Hames
f4cfadb9c0 [Orc] Fix common symbol support in ORC.
Common symbol support in ORC was broken in r270716 when the symbol resolution
rules in RuntimeDyld were changed. With the switch to lazily materialized
symbols in r277386, common symbols can be supported by having
RuntimeDyld::emitCommonSymbols search for (but not materialize!) definitions
elsewhere in the logical dylib.

This patch adds the 'Common' flag to JITSymbolFlags, and the necessary check
to RuntimeDyld::emitCommonSymbols.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277397 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 22:23:24 +00:00
David Blaikie
4c028797dc Simplify some code found when it was moved in r277177
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277394 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 21:50:43 +00:00
Michael Kuperstein
3a6d437582 [PM] Port SpeculativeExecution to the new PM
Differential Revision: https://reviews.llvm.org/D23033


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277393 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 21:48:33 +00:00
Derek Schuff
6b6b112dba [WebAssembly] Add asm.js-style exception handling support
Summary: This patch includes asm.js-style exception handling support for
WebAssembly. The WebAssembly MVP does not have any support for
unwinding or non-local control flow. In order to support C++ exceptions,
emscripten currently uses JavaScript exceptions along with some support
code (written in JavaScript) that is bundled by emscripten with the
generated code.
This scheme lowers exception-related instructions for wasm such that
wasm modules can be compatible with emscripten's existing scheme and
share the support code.

Patch by Heejin Ahn

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277391 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 21:34:04 +00:00
Sumanth Gundapaneni
95c3ece2ff Build llvm with ccache if package is present
This patch has the following changes

The CMake variable LLVM_CCACHE_BUILD is set to OFF by default.
Set this to ON for a ccache enabled build

CCACHE_CPP2 is required to compile the source file directly instead
of compiling the preprocessed file. This will help WERROR is turned ON
for a host clang compiler

The below two options makes more sense in the context of a buildbot

CCACHE_HASHDIR is required to maintain the separate cached data across
builders. This will also help the debuggers to point to the correct source
location

CCACHE_SIZE is important in the perspective of buildbot to increase the
limit on the amount of data to hold in cache for faster compilation

CCACHE_DIR is used to save the cached data to a specific directory.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277389 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 21:28:03 +00:00
Zachary Turner
822ef4e420 [msf] Teach LLVM to parse a split Fpm.
The FPM is split at regular intervals across the MSF file, as the MS code
suggests. It turns out that the value of the interval is precisely the
block size. If the block size is 4096, then there are two Fpm pages every
4096 blocks.

So here we teach the PDBFile class to parse a split FPM, and also add more
options when dumping the FPM to display some additional information such
as orphaned pages (pages which the FPM says are allocated, but which
nothing appears to use), use after free pages (pages which the FPM says
are not allocated, but which are referenced by a stream), and multiple use
pages (pages which the FPM says are allocated but are used more than
once).

Reviewed By: ruiu
Differential Revision: https://reviews.llvm.org/D23022

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277388 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 21:19:45 +00:00
Lang Hames
075c1e2e1a [ExecutionEngine][MCJIT][Orc] Replace RuntimeDyld::SymbolInfo with JITSymbol.
This patch replaces RuntimeDyld::SymbolInfo with JITSymbol: A symbol class
that is capable of lazy materialization (i.e. the symbol definition needn't be
emitted until the address is requested). This can be used to support common
and weak symbols in the JIT (though this is not implemented in this patch).

For consistency, RuntimeDyld::SymbolResolver is renamed to JITSymbolResolver.

For space efficiency a new class, JITEvaluatedSymbol, is introduced that
behaves like the old RuntimeDyld::SymbolInfo - i.e. it is just a pair of an
address and symbol flags. Instances of JITEvaluatedSymbol can be used in
symbol-tables to avoid paying the space cost of the materializer.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277386 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 20:49:11 +00:00
Krzysztof Parzyszek
9296f21a70 [Hexagon] Tidy up some code, NFC: reapply r277372 with a fix
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277383 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 20:31:50 +00:00
Xinliang David Li
fa6022726f [Profile] IR profiling minor cleanup /nfc
Differential Revision: http://reviews.llvm.org/D22995



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277379 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 20:25:06 +00:00
Matthew Simpson
8a44831abe [LV] Move isGatherOrScatterLegal into LoopVectorizationLegality (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277376 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 20:11:25 +00:00
Matthew Simpson
abaa42dca0 [LV] Use getPointerOperand helper where appropriate (NFC)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277375 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 20:08:09 +00:00
Krzysztof Parzyszek
71a7b1e6dc Revert r277372, it is causing buildbot failures
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277374 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 20:00:33 +00:00
Krzysztof Parzyszek
d7943136ad [Hexagon] Tidy up some code, NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277372 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 19:46:21 +00:00
Michael Kuperstein
8be735fdf7 [DAGCombine] Make sext(setcc) combine respect getBooleanContents
We used to combine "sext(setcc x, y, cc) -> (select (setcc x, y, cc), -1, 0)"
Instead, we should combine to (select (setcc x, y, cc), T, 0) where the value
of T is 1 or -1, depending on the type of the setcc, and getBooleanContents()
for the type if it is not i1.

This fixes PR28504.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277371 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 19:39:49 +00:00
Ron Lieberman
16082a39ea [Hexagon] Generate vector printing instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277370 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 19:36:39 +00:00
George Burgess IV
4df351da7d [CFLAA] Remove modref queries from CFLAA.
As it turns out, modref queries are broken with CFLAA. Specifically,
the data source we were using for determining modref behaviors
explicitly ignores operations on non-pointer values. So, it wouldn't
note e.g. storing an i32 to an i32* (or loading an i64 from an i64*).
It also ignores external function calls, rather than acting
conservatively for them.

(N.B. These operations, where necessary, *are* tracked by CFLAA; we just
use a different mechanism to do so. Said mechanism is relatively
imprecise, so it's unlikely that we can provide reasonably good modref
answers with it as implemented.)

Patch by Jia Chen.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277366 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 18:47:28 +00:00
Evandro Menezes
665f6036f6 [AArch64] Add support for Samsung Exynos M2 (NFC).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277364 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 18:39:45 +00:00
George Burgess IV
e0188664fb [CFLAA] Make CFLAnders more conservative with new Values.
Currently, CFLAnders assumes that values it hasn't seen don't alias
anything. This patch fixes that. Given that the only way for this to
happen is to query AA, rely on specific transformations happening, then
query AA again (looking for a specific set of queries), lit testing is a
bit difficult. If someone really wants a test, I'm happy to add one.

Patch by Jia Chen.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277362 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 18:27:33 +00:00
David Majnemer
c6005fe2b8 Included test for r277360.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277361 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 18:07:19 +00:00
David Majnemer
6687e3a1ed [Verifier] Resume instructions can only be in functions w/ a personality
This fixes PR28799.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277360 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 18:06:34 +00:00
Krzysztof Parzyszek
c54b1ec0f8 Replace MachineInstr* with MachineInstr& in TargetInstrInfo, NFC
There were a few cases introduced with the modulo scheduler.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277358 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 17:55:48 +00:00
Krzysztof Parzyszek
c765d85307 [Hexagon] Check for offset overflow when reserving scavenging slots
Scavenging slots were only reserved when pseudo-instruction expansion in
frame lowering created new virtual registers. It is possible to still
need a scavenging slot even if no virtual registers were created, in cases
where the stack is large enough to overflow instruction offsets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277355 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 17:15:30 +00:00
Nirav Dave
b1a08aee35 Add removed inline-assembly-comment test from r277146
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277349 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 15:36:10 +00:00
Daniel Sanders
a738e21392 [mips][fastisel] Correct argument lowering for (f64, f64, i32) and similar.
Summary:
Allocating an AFGR64 shadows two GPR32's instead of just one.

This fixes an LNT regression detected by our internal buildbots.

Reviewers: sdardis

Subscribers: dsanders, sdardis, llvm-commits

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277348 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 15:32:51 +00:00
Valery Pykhtin
1704eb6864 [AMDGPU] refactor DS instruction definitions. NFC.
Differential revision: https://reviews.llvm.org/D22522

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277344 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 14:21:30 +00:00
Simon Pilgrim
f6cf26bc83 [X86] Use implicit masking of SHLD/SHRD shift double instructions
Similar to the regular shift instructions, SHLD/SHRD only use the bottom bits of the shift value


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277341 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 12:11:43 +00:00
Simon Pilgrim
ec511c29a7 Fixed test check ordering issue on windows buildbots
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@277337 91177308-0d34-0410-b5e6-96231b3b80d8
2016-08-01 10:40:15 +00:00