135926 Commits

Author SHA1 Message Date
Daniel Sanders
26a5022ce8 [lit] Document the 'available_features' member of the config object.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276744 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 13:23:27 +00:00
Simon Pilgrim
23967709ee [X86][SSE] Added extra memory folding tests for cvtsd2ss intrinsic
SSE only fold partial reg update instructions when optsize is enabled

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276743 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 12:44:50 +00:00
Simon Pilgrim
9c00fcc1ab [X86][SSE] Fixed issue with memory folding of (v)cvtsd2ss intrinsics
Fixed typo in the intrinsic definitions of (v)cvtsd2ss with memory folding.

This was only unearthed when rL276102 started using the intrinsic again.....

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276740 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 10:41:28 +00:00
Simon Dardis
edf7e07438 [mips] MIPS64R6 compact branch support
MIPS64R6 compact branch support. As the MIPS LLVM backend uses distinct
MachineInstrs for certain 32 and 64 bit instructions (e.g. BEQ & BEQ64) that
map to the same instruction, extend compact branch support for the
corresponding 64bit branches.

Reviewers: dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276739 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 10:25:07 +00:00
Simon Pilgrim
2b0c19571d Fixed spelling in comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276738 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 09:55:31 +00:00
Benjamin Kramer
ae09a8743f [tblgen] Compare const char * with strcmp instead of creating StringRef.
Avoids a call to strlen on both strings which always reads the entire
string. strcmp can use early exit.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276737 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 09:27:51 +00:00
Simon Dardis
38a44a828c [mips] sgtu, s[rl]l, sra, dnegu, neg instruction aliases
Add the instruction alias sgtu (register form only), two operand forms of
s[rl]l and sra, and missing single/two operand forms of dnegu/neg.

Reviewers: dsanders

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276736 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 09:13:46 +00:00
Craig Topper
2e40e16391 [X86] Remove isCommutable=1 from instructions that also load. Commuting such instruction isn't useful as it would unfold the load. The exception being FMA3 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276733 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 08:06:18 +00:00
Craig Topper
70baa1d951 [AVX512] Don't mark ADDSSZr_Int or MULSSZr_Int as commutable. The intrinsics have one of their arguments indicated as passing through the high bits and we can't commute that.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276732 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 08:06:14 +00:00
Dimitry Andric
b98adc86e7 Remove obsolete XFAIL for a test that used to sometimes miscompile under
FreeBSD with gcc 4.2.1, a long time ago (see r113824).  Noticed by Pete
Cooper.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276730 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 06:49:14 +00:00
David Majnemer
e37fa0be6d Reapply: [InstSimplify] Add support for bitcasts"
This reverts commit r276700 and reapplies r276698.
The relevant clang tests have been updated.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276727 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 05:52:29 +00:00
Amaury Sechet
7f21dd50bc Propery format doccomment in lto.h . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276725 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 04:20:30 +00:00
Matthias Braun
bb936d2a6e LiveIntervalAnalysis: Fix handleMoveDown() problem
If we move a last-use register read to a later position we may skip
intermediate segments. This may require us to not only extend the
segment before the NewIdx, but also extend the segment live-in to
OldIdx.

This switches LiveIntervalTest to use AMDGPU so we can test subregister
liveness.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276724 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 03:57:45 +00:00
Tim Northover
6ba60326a1 GlobalISel: remove redundant ';'s. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276723 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 03:29:18 +00:00
Chris Bieneman
a6b4cd40ca [CMake] Updating Xcode Toolchain creation to support Xcode 7
Recent changes to Xcode have changed the structure of Xcode toolchains. This patch makes the xcode-toolchain goop construct a new-format Xcode toolchain that is compatible with Xcode 7.

The new format has a compatibility version key, so when a new format comes out we can support multiple formats in parallel.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276718 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 00:47:52 +00:00
Sebastian Pop
2970c2210e GVN-hoist: use a DFS numbering of instructions (PR28670)
Instead of DFS numbering basic blocks we now DFS number instructions that avoids
the costly operation of which instruction comes first in a basic block.

Patch mostly written by Daniel Berlin.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276714 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 00:15:10 +00:00
Sebastian Pop
4df990e9af GVN-hoist: limit hoisting depth (PR28670)
This patch adds an option to specify the maximum depth in a BB at which to
consider hoisting instructions.  Hoisting instructions from a deeper level is
not profitable as it increases register pressure and compilation time.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276713 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 00:15:08 +00:00
Evgeniy Stepanov
6f1298ed27 [safestack] Fix stack guard live range.
Stack guard slot is live throughout the function.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276712 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-26 00:05:14 +00:00
Chris Bieneman
6f3aeb57d6 [CMake] Support feeding DYLD_LIBRARY_PATH into archiver calls
OS X 10.11 has a feature named System Integrity Protection. The goal of the feature is to make system binaries immutable (even as root). One part of this is that protected binaries do not receive DYLD_* environment variables because the kernel scrubs them before process launch.

This causes problems for LTO bootstrap builds on Darwin that try to use the just-built libLTO with the host ar, ranlib, or libtool.

This patch addresses two problems.

(1) The tools themselves aren't protected binaries but the shim tools installed at / are, so we need to call xcrun -find to find libtool instead of using the one CMake finds.

(2) Some build tools (ninja and make) use /bin/sh to invoke their subprocesses. Since /bin/sh is a system binary, the kernel scrubs the DYLD envars from their environment. To work around this we need to set the environment variables as part of the archiver commands, so the envars are set by the shell process instead of on the shell process.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276710 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 23:46:08 +00:00
Adam Nemet
4aaf0b6303 [lit] Don't match tool names within new PM's <> markers
For example, stop expanding 'opt' in -passes='require<opt-remark-emit>'.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276707 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 23:09:10 +00:00
Michael Kuperstein
efd299c08e Attempt to pacify windows bots, again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 22:29:04 +00:00
Renato Golin
c5c6574a85 [ARM] Saturation instructions are DSP-only
The saturation instructions appeared in v6T2, with DSP extensions, but they
were being accepted / generated on any, with the new introduction of the
saturation detection in the back-end. This commit restricts the usage to
DSP-enable only cores.

Fixes PR28607.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276701 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 22:25:25 +00:00
David Majnemer
f6fdf20c5f Revert "[InstSimplify] Add support for bitcasts"
This reverts commit r276698.  Clang has tests which rely on the
optimizer :(

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276700 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 22:24:59 +00:00
David Majnemer
66e75f38d9 [InstSimplify] Add support for bitcasts
BitCasts of BitCasts can be folded away as can BitCasts which don't
change the type of the operand.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276698 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 22:04:58 +00:00
David Blaikie
795e327d8d [WebAssembly] Update for Target API (TargetRegistry::RegisterMCAsmBackend) change
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276694 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 21:41:42 +00:00
Simon Pilgrim
adc44906fa [X86] Regenerate v2i256 shift legalization tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 21:14:22 +00:00
Simon Pilgrim
fcc0edcc83 [X86] Regenerate i64 shift legalization tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276691 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 21:11:45 +00:00
Tim Northover
967b5082a2 GlobalISel: add generic casts to IRTranslator
This adds LLVM's 3 main cast instructions (inttoptr, ptrtoint, bitcast) to the
IRTranslator. The first two are direct translations (with 2 MachineInstr types
each). Since LLT discards information, a bitcast might become trivial and we
emit a COPY in those cases instead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276690 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 21:01:29 +00:00
Tim Northover
dad4827eff GlobalISel[AArch64]: support pointer types in argument lowering.
They're basically i64 for AArch64, but we'll leave them intact for stranger
targets. Also add some tests for the (very few) other cases we can handle right
now.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276689 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 21:01:17 +00:00
Michael Kuperstein
b3391842c6 [PM] Port SymbolRewriter to the new PM
Differential Revision: https://reviews.llvm.org/D22703


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276687 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 20:52:00 +00:00
Kevin Enderby
dc02554240 Next step along the way to getting good error messages for bad archives.
I consulted with Lang Hames on this work, and the goal was to add a bit
of "where" in the archive the error occurred along with what the error was.

So this step changes ArchiveMemberHeader into a class with a pointer
to the archive header and the parent archive.  Which allows the methods
in the ArchiveMemberHeader to determine which member the header is
for to include that information in the error message.

For this first step the "where" is just the offset to the member in the
archive.  The next step will be a new method on ArchiveMemberHeader
to get the full name, if possible, to be use in the error message.  Which
will now be possible as ArchiveMemberHeader contains a pointer to
the Archive with its string table and its size, etc. so the full name can
be determined from the header if it is valid.

Also this change adds the missing checks the archive header is actually
contained in the buffer and is not truncated, as well as if the terminating
characters are correct in the header.

And changes one error message in Archive::Child::getNext() where the
name or offset to member is now added.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276686 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 20:36:36 +00:00
Jordan Rose
cb3d8afa45 Fix r276671 to not use a defaulted move constructor.
MSVC won't provide the body of this move constructor and assignment
operator, possibly because the copy constructor is banned. Just write
it manually.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276685 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 20:34:25 +00:00
Jan Vesely
4a44da0c82 AMDGPU: Remove read_workdim intrinsic
Differential revision: https://reviews.llvm.org/D22732

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276682 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 20:17:02 +00:00
Matt Arsenault
dc848c22cc Scalarizer: Support scalarizing intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276681 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 20:02:54 +00:00
Matt Arsenault
21e0aa8d55 AMDGPU: Make skip threshold an option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276680 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 19:48:29 +00:00
Matt Arsenault
9b4a967989 AMDGPU: Fix missing verify-machineinstrs in control flow test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276679 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 19:39:06 +00:00
Matt Arsenault
6724293c44 LiveIntervals: Return index from replaceMachineInstrInMaps
Fixes weird asymmetry with insertion

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276678 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 19:39:04 +00:00
Matt Arsenault
065de94c4a MachineVerifier: Fix printing nonsense for physical registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276677 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 19:39:01 +00:00
Evgeniy Stepanov
4791de83c3 Fix invalid iterator use in safestack coloring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276676 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 19:25:40 +00:00
Matt Arsenault
5895e79530 AMDGPU: Delete dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276675 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 19:06:25 +00:00
Rong Xu
568d841225 [PGO] Fix profile mismatch in COMDAT function with pre-inliner
Pre-instrumentation inline (pre-inliner) greatly improves the IR
instrumentation code performance, among other benefits. One issue of the
pre-inliner is it can introduce CFG-mismatch for COMDAT functions. This
is due to the fact that the same COMDAT function may have different early
inline decisions across different modules -- that means different copies
of COMDAT functions will have different CFG checksum.

In this patch, we propose a partially renaming the COMDAT group and its
member function/variable so we have different profile counter for each
version. We will post-fix the COMDAT function and the group name with its
FunctionHash.

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


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276673 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 18:45:37 +00:00
Michael Kuperstein
8969e2c091 Attempt to pacify windows bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276672 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 18:39:08 +00:00
Jordan Rose
569213a17c StringSwitch cannot be copied (take 2).
This prevents StringSwitch from being used with 'auto', which is
important because the inferred type is StringSwitch rather than the
result type. This is a problem because StringSwitch stores addresses
of temporary values rather than copying or moving the value into its
own storage.

This is a compromise that still allows wrapping StringSwitch in other
temporary structures, which (unlike StringSwitch) may be non-trivial
to set up and therefore want to at least be movable. (For an example,
see QueryParser.cpp in clang-tools-extra.)

Changing this uncovered the bug in PassBuilder, also in this patch.
Clang doesn't seem to have any occurrences of the issue.

Re-commit of r276652.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276671 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 18:34:51 +00:00
Daniel Berlin
5b3d02d932 Revert NewGVN N^2 behavior patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276670 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 18:19:49 +00:00
Zachary Turner
731237c88d Add a modulemap for LLVMDebugInfoMsf.
Differential Revision: https://reviews.llvm.org/D22769

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276669 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 18:18:59 +00:00
Michael Kuperstein
875b0da43f Don't use iplist in SymbolRewriter. NFC.
There didn't appear to be a good reason to use iplist in this case, a regular
list of unique_ptr works just as well.
Change made in preparation to a new PM port (since iplist is not moveable).


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276668 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 18:10:54 +00:00
Justin Bogner
7e6a258476 cmake: When adding lit testsuites, ignore Output directories
With in-tree builds we can get Output directories scattered among our
tests. Recursing into those to find tests doesn't make sense.

Thanks to nlewycky for noticing this!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276667 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 18:07:14 +00:00
Simon Pilgrim
3757ea80f3 [X86][SSE] Added 2048-bit vector comparison tests
Upper limit of what can be held in a <32 x i8> result

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276666 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 17:56:01 +00:00
Daniel Berlin
d1e02cb9b3 NFC: Make a few asserts in GVNHoist do the same thing, but cheaper.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276662 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 17:36:14 +00:00
Jordan Rose
c0eeb4bf36 Revert "StringSwitch cannot be copied or moved."
This reverts commit r276652. The clang-query tool is currently
relying on this behavior. I'll try again later.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276661 91177308-0d34-0410-b5e6-96231b3b80d8
2016-07-25 17:28:33 +00:00