OSDN Git Service
Amaury Sechet [Tue, 26 Jul 2016 04:20:30 +0000 (04:20 +0000)]
Propery format doccomment in lto.h . NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276725
91177308-0d34-0410-b5e6-
96231b3b80d8
Matthias Braun [Tue, 26 Jul 2016 03:57:45 +0000 (03:57 +0000)]
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
Tim Northover [Tue, 26 Jul 2016 03:29:18 +0000 (03:29 +0000)]
GlobalISel: remove redundant ';'s. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276723
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Tue, 26 Jul 2016 00:47:52 +0000 (00:47 +0000)]
[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
Sebastian Pop [Tue, 26 Jul 2016 00:15:10 +0000 (00:15 +0000)]
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
Sebastian Pop [Tue, 26 Jul 2016 00:15:08 +0000 (00:15 +0000)]
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
Evgeniy Stepanov [Tue, 26 Jul 2016 00:05:14 +0000 (00:05 +0000)]
[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
Chris Bieneman [Mon, 25 Jul 2016 23:46:08 +0000 (23:46 +0000)]
[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
Adam Nemet [Mon, 25 Jul 2016 23:09:10 +0000 (23:09 +0000)]
[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
Michael Kuperstein [Mon, 25 Jul 2016 22:29:04 +0000 (22:29 +0000)]
Attempt to pacify windows bots, again.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276703
91177308-0d34-0410-b5e6-
96231b3b80d8
Renato Golin [Mon, 25 Jul 2016 22:25:25 +0000 (22:25 +0000)]
[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
David Majnemer [Mon, 25 Jul 2016 22:24:59 +0000 (22:24 +0000)]
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
David Majnemer [Mon, 25 Jul 2016 22:04:58 +0000 (22:04 +0000)]
[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
David Blaikie [Mon, 25 Jul 2016 21:41:42 +0000 (21:41 +0000)]
[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
Simon Pilgrim [Mon, 25 Jul 2016 21:14:22 +0000 (21:14 +0000)]
[X86] Regenerate v2i256 shift legalization tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276692
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Mon, 25 Jul 2016 21:11:45 +0000 (21:11 +0000)]
[X86] Regenerate i64 shift legalization tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276691
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 25 Jul 2016 21:01:29 +0000 (21:01 +0000)]
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
Tim Northover [Mon, 25 Jul 2016 21:01:17 +0000 (21:01 +0000)]
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
Michael Kuperstein [Mon, 25 Jul 2016 20:52:00 +0000 (20:52 +0000)]
[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
Kevin Enderby [Mon, 25 Jul 2016 20:36:36 +0000 (20:36 +0000)]
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
Jordan Rose [Mon, 25 Jul 2016 20:34:25 +0000 (20:34 +0000)]
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
Jan Vesely [Mon, 25 Jul 2016 20:17:02 +0000 (20:17 +0000)]
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
Matt Arsenault [Mon, 25 Jul 2016 20:02:54 +0000 (20:02 +0000)]
Scalarizer: Support scalarizing intrinsics
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276681
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 25 Jul 2016 19:48:29 +0000 (19:48 +0000)]
AMDGPU: Make skip threshold an option
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276680
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 25 Jul 2016 19:39:06 +0000 (19:39 +0000)]
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
Matt Arsenault [Mon, 25 Jul 2016 19:39:04 +0000 (19:39 +0000)]
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
Matt Arsenault [Mon, 25 Jul 2016 19:39:01 +0000 (19:39 +0000)]
MachineVerifier: Fix printing nonsense for physical registers
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276677
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 25 Jul 2016 19:25:40 +0000 (19:25 +0000)]
Fix invalid iterator use in safestack coloring.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276676
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Mon, 25 Jul 2016 19:06:25 +0000 (19:06 +0000)]
AMDGPU: Delete dead code
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276675
91177308-0d34-0410-b5e6-
96231b3b80d8
Rong Xu [Mon, 25 Jul 2016 18:45:37 +0000 (18:45 +0000)]
[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
Michael Kuperstein [Mon, 25 Jul 2016 18:39:08 +0000 (18:39 +0000)]
Attempt to pacify windows bots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276672
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 25 Jul 2016 18:34:51 +0000 (18:34 +0000)]
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
Daniel Berlin [Mon, 25 Jul 2016 18:19:49 +0000 (18:19 +0000)]
Revert NewGVN N^2 behavior patch
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276670
91177308-0d34-0410-b5e6-
96231b3b80d8
Zachary Turner [Mon, 25 Jul 2016 18:18:59 +0000 (18:18 +0000)]
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
Michael Kuperstein [Mon, 25 Jul 2016 18:10:54 +0000 (18:10 +0000)]
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
Justin Bogner [Mon, 25 Jul 2016 18:07:14 +0000 (18:07 +0000)]
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
Simon Pilgrim [Mon, 25 Jul 2016 17:56:01 +0000 (17:56 +0000)]
[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
Daniel Berlin [Mon, 25 Jul 2016 17:36:14 +0000 (17:36 +0000)]
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
Jordan Rose [Mon, 25 Jul 2016 17:28:33 +0000 (17:28 +0000)]
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
Daniel Berlin [Mon, 25 Jul 2016 17:24:27 +0000 (17:24 +0000)]
Fix N^2 instruction ordering comparisons in GVNHoist.
This fixes GVNHoist's portion of PR28670.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276658
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Berlin [Mon, 25 Jul 2016 17:24:22 +0000 (17:24 +0000)]
NFC: Refactor GVNHoist class so not everything is public
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276657
91177308-0d34-0410-b5e6-
96231b3b80d8
Joel Jones [Mon, 25 Jul 2016 17:18:28 +0000 (17:18 +0000)]
MC] Provide an MCTargetOptions to implementors of MCAsmBackendCtorTy, NFC
Some targets, notably AArch64 for ILP32, have different relocation encodings
based upon the ABI. This is an enabling change, so a future patch can use the
ABIName from MCTargetOptions to chose which relocations to use. Tested using
check-llvm.
The corresponding change to clang is in: http://reviews.llvm.org/D16538
Patch by: Joel Jones
Differential Revision: https://reviews.llvm.org/D16213
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276654
91177308-0d34-0410-b5e6-
96231b3b80d8
Jordan Rose [Mon, 25 Jul 2016 17:08:24 +0000 (17:08 +0000)]
StringSwitch cannot be copied or moved.
...but most importantly, it cannot be used well with 'auto', 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.
Changing this uncovered the bug in PassBuilder, also in this patch.
Clang doesn't seem to have any occurrences of the issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276652
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Mon, 25 Jul 2016 16:51:00 +0000 (16:51 +0000)]
AVX-512: Fixed [US]INT_TO_FP selection for i1 vectors.
It failed with assertion before this patch.
Differential Revision: https://reviews.llvm.org/D22735
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276648
91177308-0d34-0410-b5e6-
96231b3b80d8
Wei Mi [Mon, 25 Jul 2016 16:27:34 +0000 (16:27 +0000)]
Remove useless pass from the pipeline in test/Analysis/Dominators/2007-01-14-BreakCritEdges.ll.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276644
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Mon, 25 Jul 2016 14:42:11 +0000 (14:42 +0000)]
[Hexagon] Add target feature to generate long calls
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276638
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 25 Jul 2016 10:11:00 +0000 (10:11 +0000)]
[ARM] Improve longMAC codegen test
Added thumb targets and dataflow checks to the longMAC test.
Differential Revision: https://reviews.llvm.org/D22684
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276629
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Mon, 25 Jul 2016 09:57:28 +0000 (09:57 +0000)]
[mips] Optimize materialization of i64 constants
Avoid MipsAnalyzeImmediate usage if the constant fits in an 32-bit
integer. This allows us to generate the same instructions for the
materialization of the same constants regardless the width of their
type.
Patch by: Vasileios Kalintiris
Contributions by: Simon Dardis
Reviewers: Daniel Sanders
Differential Review: https://reviews.llvm.org/D21689
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276628
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 25 Jul 2016 09:29:24 +0000 (09:29 +0000)]
[ARM] Small refactor of Thumb2 SMLA insts
Follow up to r276624. Changes bits 22-20 to be parameters to
instruction class.
Differential Revision: https://reviews.llvm.org/D22562
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276626
91177308-0d34-0410-b5e6-
96231b3b80d8
Sam Parker [Mon, 25 Jul 2016 09:20:20 +0000 (09:20 +0000)]
[ARM] Enable ISel of SMMLS for ARM and Thumb2
Use ISelDAGToDAG to recognise the SMMLS instruction pattern.
Differential Revision: https://reviews.llvm.org/D22562
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276624
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jul 2016 07:20:35 +0000 (07:20 +0000)]
[AVX512] Add load folding support for the unmasked forms of the FMA instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276615
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jul 2016 07:20:31 +0000 (07:20 +0000)]
[AVX512] Add some additional patterns so that we can fold broadcast loads in the first argument of an FMADD/FMSUB/FNMADD/FNMSUB/FMADDSUB/FMSUBADD node. Also add patterns to support all combinations of the broadcast input and the preserved input for masked versions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276614
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 25 Jul 2016 07:20:28 +0000 (07:20 +0000)]
[AVX512] Cleanup FMA operand order in patterns to match the VEX versions and to really be 213, 231, and 132.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276613
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Mon, 25 Jul 2016 05:57:59 +0000 (05:57 +0000)]
Cleanup : Reformat PartialInliner.cpp to have current LLVM style conventions
Modify the variable names and code style to be that of modern LLVM.
Patch by River Riddle!
Differential Revision: https://reviews.llvm.org/D22743
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276610
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Mon, 25 Jul 2016 05:00:00 +0000 (05:00 +0000)]
Fix : Partial Inliner requires AssumptionCacheTracker
The public InlineFunction utility assumes that the passed in
InlineFunctionInfo has a valid AssumptionCacheTracker.
Patch by River Riddle!
Differential Revision: https://reviews.llvm.org/D22706
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276609
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 25 Jul 2016 03:39:21 +0000 (03:39 +0000)]
[InstSimplify] Fold trunc([zs]ext(%V)) -> %V
Truncates can completely cancel out a zext or sext instruction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276604
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 25 Jul 2016 02:21:25 +0000 (02:21 +0000)]
[GVNHoist] Merge metadata on hoisted instructions less conservatively
We can combine metadata from multiple instructions intelligently for
certain metadata nodes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276602
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 25 Jul 2016 02:21:23 +0000 (02:21 +0000)]
[GVNHoist] Properly merge alignments when hoisting
If we two loads of two different alignments, we must use the minimum of
the two alignments when hoisting. Same deal for stores.
For allocas, use the maximum of the two allocas.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276601
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Mon, 25 Jul 2016 02:21:19 +0000 (02:21 +0000)]
[Utils] Simplify combineMetadata
Use a range-based for loop, no functional change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276600
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 25 Jul 2016 00:59:51 +0000 (00:59 +0000)]
Untabify.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276597
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 25 Jul 2016 00:59:46 +0000 (00:59 +0000)]
Trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276596
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sun, 24 Jul 2016 17:19:59 +0000 (17:19 +0000)]
[CommandLine] Use Process::GetEnv instead of _wgetenv
Process::GetEnv does the right thing across our platforms.
CommandLine.cpp had, more or less, the same logic. Let's remove the
duplication.
No functional change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276572
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Jul 2016 16:39:50 +0000 (16:39 +0000)]
[X86][SSE] Added PR27854 tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276571
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Jul 2016 16:10:21 +0000 (16:10 +0000)]
[X86] Add shift double tests for PR14593
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276570
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Jul 2016 16:00:53 +0000 (16:00 +0000)]
[X86] Add 'FeatureSlowSHLD' to cpu 'bdver4'
As with all AMD CPUs, excavator has poor SHLD/SHRD performance. Also added bdver3 to the test as it was missing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276569
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Jul 2016 15:47:44 +0000 (15:47 +0000)]
[X86] Add SHRD shift combine tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276568
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Jul 2016 15:38:51 +0000 (15:38 +0000)]
[X86] Regenerate shift by parts tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276567
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Jul 2016 15:25:36 +0000 (15:25 +0000)]
[X86][SSE] Regenerate shifts tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276566
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Jul 2016 15:17:50 +0000 (15:17 +0000)]
[X86][SSE] Regenerate SSE copysign tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276565
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sun, 24 Jul 2016 13:01:51 +0000 (13:01 +0000)]
[X86][AVX512VL] Added AVX512VL half2float vector conversions tests to demonstrate PR23941
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276563
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jul 2016 08:26:38 +0000 (08:26 +0000)]
[X86] Make the FMA3 instruction names consistent between VEX and EVEX encoded versions.
This places the 132/213/231 form number in front of the SS/SD/PS/PD. Move the Y for 256-bit versions to be after the PS/PD. Change the AVX512 scalar forms to include a Z in the their name. This new format should be consistent with the general naming of instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276559
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 24 Jul 2016 07:32:45 +0000 (07:32 +0000)]
[X86] Replace CodeGenOnly VPSRAVW/D/Q_Int instructions with patterns since the operand types exactly match the normal VPSRAVW/D/Q instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276555
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Sun, 24 Jul 2016 07:24:54 +0000 (07:24 +0000)]
[Loop Vectorizer] Handling loops FP induction variables.
Allowed loop vectorization with secondary FP IVs. Like this:
float *A;
float x = init;
for (int i=0; i < N; ++i) {
A[i] = x;
x -= fp_inc;
}
The auto-vectorization is possible when the induction binary operator is "fast" or the function has "unsafe" attribute.
Differential Revision: https://reviews.llvm.org/D21330
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276554
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Sun, 24 Jul 2016 07:03:49 +0000 (07:03 +0000)]
[MSSA] Make EXPENSIVE_CHECKS check more.
checkClobberSanity will now be run for all results of `ClobberWalk`,
instead of just the crazy phi-optimized ones. This can help us catch
cases where our cache is being wonky.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276553
91177308-0d34-0410-b5e6-
96231b3b80d8
George Burgess IV [Sun, 24 Jul 2016 01:50:07 +0000 (01:50 +0000)]
[MSSA] Remove useless assert. NFC.
liveOnEntry is always a MemoryDef; asserting that a MemoryPhi isn't
liveOnEntry, while correct, isn't very helpful. :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276542
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Jul 2016 21:24:02 +0000 (21:24 +0000)]
[X86][SSE] Added float widened broadcast tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276535
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Jul 2016 21:15:31 +0000 (21:15 +0000)]
[X86][SSE] Added more widened broadcast tests
Added more vXi16 and vXi8 tests
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276534
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 23 Jul 2016 20:11:21 +0000 (20:11 +0000)]
Change some more llvm highlighting instances to be text instead. It seems that Pygment does not handle "token" or "none" yet, and this caused the documentation bot to go red.
Patch by Gor Nishanov.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276532
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 23 Jul 2016 18:53:35 +0000 (18:53 +0000)]
Switching the highlighting from llvm to none in an attempt to appease the build bot (lab.llvm.org:8011/builders/llvm-sphinx-docs/builds/11984/steps/docs-llvm-html/logs/stdio).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276531
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Sat, 23 Jul 2016 18:52:21 +0000 (18:52 +0000)]
Removes a warning about duplicate label named _strings from CommandLine.rst.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276530
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Dardis [Sat, 23 Jul 2016 17:40:48 +0000 (17:40 +0000)]
CODE_OWNERS: Take ownership of the MIPS backend
As agreed with Daniel Sanders, I'm taking over as code owner
for the MIPS backend.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276529
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jul 2016 16:44:08 +0000 (16:44 +0000)]
[X86] Fix typo in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276528
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Jul 2016 16:19:17 +0000 (16:19 +0000)]
[X86][SSE] Added tests where we should be trying to widen a load+splat into a broadcast
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276527
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Sat, 23 Jul 2016 15:55:42 +0000 (15:55 +0000)]
[X86][SSE] Regenerated uitofp <2 x i32> -> <2 x float> conversion tests
Demonstrate difference in codegen discussed on PR14760
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276526
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 23 Jul 2016 13:06:49 +0000 (13:06 +0000)]
[InstCombine] allow icmp (bit-manipulation-intrinsic(), C) folds for vectors
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276523
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 23 Jul 2016 07:50:05 +0000 (07:50 +0000)]
Fix a GCC error due to this member name also being a type name. This
should fix the build with GCC 4.9 at least. Not sure if this is the
right name or fix, but I've followed up on the original commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276522
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jul 2016 07:16:56 +0000 (07:16 +0000)]
[AVX512] Implement commuting support for EVEX encoded FMA3 instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276521
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jul 2016 07:16:53 +0000 (07:16 +0000)]
[X86] Make one of the FMA3 commuting methods static. Remove a call to isFMA3 just to get the IsIntrisic flag, instead get it during the first call and pass it along. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276520
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 23 Jul 2016 07:16:50 +0000 (07:16 +0000)]
[X86] Fix switch statement indentation per coding standards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276519
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Sat, 23 Jul 2016 07:07:14 +0000 (07:07 +0000)]
AMDGPU: Delete dead code
This has been dead since r269479
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276518
91177308-0d34-0410-b5e6-
96231b3b80d8
Xinliang David Li [Sat, 23 Jul 2016 04:28:52 +0000 (04:28 +0000)]
[Profile] Use explicit flag to enable IR PGO
Patch by Jake VanAdrighem
Differential Revision: http://reviews.llvm.org/D22607
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276516
91177308-0d34-0410-b5e6-
96231b3b80d8
Sean Silva [Sat, 23 Jul 2016 04:22:50 +0000 (04:22 +0000)]
Avoid using a raw AssumptionCacheTracker in various inliner functions.
This unblocks the new PM part of River's patch in
https://reviews.llvm.org/D22706
Conveniently, this same change was needed for D21921 and so these
changes are just spun out from there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276515
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 23 Jul 2016 04:05:08 +0000 (04:05 +0000)]
[coroutines] Part 1 of N: Documentation
This is the first patch in the coroutine series.
It contains the documentation for the coroutine intrinsics and their usage.
Patch by Gor Nishanov!
Differential Revision: https://reviews.llvm.org/D22603
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276513
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Sat, 23 Jul 2016 02:56:49 +0000 (02:56 +0000)]
[LoopUnrollAnalyzer] Handle out of bounds accesses in visitLoad
While we handed loads past the end of an array, we didn't handle loads
_before_ the array.
This fixes PR28062.
N.B. While the bug in the code is obvious, I am struggling to craft a
test case which is reasonable in size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276510
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 23 Jul 2016 00:54:36 +0000 (00:54 +0000)]
[SCEV] Make isImpliedCondOperandsViaRanges smarter
This change lets us prove things like
"{X,+,10} s< 5000" implies "{X+7,+,10} does not sign overflow"
It does this by replacing replacing getConstantDifference by
computeConstantDifference (which is smarter) in
isImpliedCondOperandsViaRanges.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276505
91177308-0d34-0410-b5e6-
96231b3b80d8
Vedant Kumar [Sat, 23 Jul 2016 00:38:11 +0000 (00:38 +0000)]
[cmake] Use a sane default for LLVM_PROFILE_DATA_DIR
It's been pointed out that arbitrarily spraying raw profiles into a
build directory is insane. Doing this wastes a tremendous amount of
space and is also very lossy, since the test harness tends to wipe away
temporary sub-directories (which usually contain relevant profile data).
The new default is a `profiles` directory inside of the build dir.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276504
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjoy Das [Sat, 23 Jul 2016 00:28:56 +0000 (00:28 +0000)]
[SCEV] Change the interface of computeConstantDifference; NFC
This is in preparation of
s/getConstantDifference/computeConstantDifference/ in a later change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276503
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 23 Jul 2016 00:28:39 +0000 (00:28 +0000)]
[InstCombine] move udiv+cmp fold over with other BinOp+cmp folds; NFCI
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276502
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Sat, 23 Jul 2016 00:09:54 +0000 (00:09 +0000)]
auto-generate checks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276501
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Fri, 22 Jul 2016 23:46:40 +0000 (23:46 +0000)]
Revert "[AMDGPU] Emit read-only data to .rodata for hsa"
This reverts commit r276298.
Data stored in .rodata can have a negative offset from .text, but we
don't support negative values in relocations yet.
This caused a regression in one of the amp conformance tests:
5_Data_Cont/5_2_a_v/5_2_3_m/Assignment/Test.02.01
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@276498
91177308-0d34-0410-b5e6-
96231b3b80d8