OSDN Git Service
David Blaikie [Fri, 13 Mar 2015 18:20:45 +0000 (18:20 +0000)]
[opaque pointer type] Add textual IR support for explicit type parameter to gep operator
Similar to gep (r230786) and load (r230794) changes.
Similar migration script can be used to update test cases, which
successfully migrated all of LLVM and Polly, but about 4 test cases
needed manually changes in Clang.
(this script will read the contents of stdin and massage it into stdout
- wrap it in the 'apply.sh' script shown in previous commits + xargs to
apply it over a large set of test cases)
import fileinput
import sys
import re
rep = re.compile(r"(getelementptr(?:\s+inbounds)?\s*\()((<\d*\s+x\s+)?([^@]*?)(|\s*addrspace\(\d+\))\s*\*(?(3)>)\s*)(?=$|%|@|null|undef|blockaddress|getelementptr|addrspacecast|bitcast|inttoptr|zeroinitializer|<|\[\[[a-zA-Z]|\{\{)", re.MULTILINE | re.DOTALL)
def conv(match):
line = match.group(1)
line += match.group(4)
line += ", "
line += match.group(2)
return line
line = sys.stdin.read()
off = 0
for match in re.finditer(rep, line):
sys.stdout.write(line[off:match.start()])
sys.stdout.write(conv(match))
off = match.end()
sys.stdout.write(line[off:])
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232184
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Fri, 13 Mar 2015 17:56:32 +0000 (17:56 +0000)]
Add the option, -non-verbose to llvm-objdump used with -macho to print things
using numeric values and not their symbolic constant names.
The routines that print Mach-O stuff already had a verbose parameter and this
change is just changing the passing true to passing !NonVerbose. With just a
couple of fixes and a bunch of test case updates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232182
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Vesely [Fri, 13 Mar 2015 17:32:46 +0000 (17:32 +0000)]
r600: Clear visited structure before running.
Fixes random crashes in for-loop piglit.
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232181
91177308-0d34-0410-b5e6-
96231b3b80d8
Jan Vesely [Fri, 13 Mar 2015 17:32:43 +0000 (17:32 +0000)]
r600: Use deque and simplify loops in AMDGPUCFGStructurizer
Signed-off-by: Jan Vesely <jan.vesely@rutgers.edu>
Reviewed-by: Matt Arsenault <Matthew.Arsenault@amd.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232180
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Fri, 13 Mar 2015 17:29:49 +0000 (17:29 +0000)]
[X86][AVX] Fix wrong lowering of v4x64 shuffles into concat_vector plus extract_subvector nodes.
This patch fixes a bug in the shuffle lowering logic implemented by function
'lowerV2X128VectorShuffle'.
The are few cases where function 'lowerV2X128VectorShuffle' wrongly expands a
shuffle of two v4X64 vectors into a CONCAT_VECTORS of two EXTRACT_SUBVECTOR
nodes. The problematic expansion only occurs when the shuffle mask M has an
'undef' element at position 2, and M is equivalent to mask <0,1,4,5>.
In that case, the algorithm propagates the wrong vector to one of the two
new EXTRACT_SUBVECTOR nodes.
Example:
;;
define <4 x double> @test(<4 x double> %A, <4 x double> %B) {
entry:
%0 = shufflevector <4 x double> %A, <4 x double> %B, <4 x i32><i32 undef, i32 1, i32 undef, i32 5>
ret <4 x double> %0
}
;;
Before this patch, llc (-mattr=+avx) generated:
vinsertf128 $1, %xmm0, %ymm0, %ymm0
With this patch, llc correctly generates:
vinsertf128 $1, %xmm1, %ymm0, %ymm0
Added test lower-vec-shuffle-bug.ll
Differential Revision: http://reviews.llvm.org/D8259
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232179
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 13 Mar 2015 16:59:29 +0000 (16:59 +0000)]
unique_ptrs are unique already, no need to unique them any further.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232178
91177308-0d34-0410-b5e6-
96231b3b80d8
Matt Arsenault [Fri, 13 Mar 2015 16:43:48 +0000 (16:43 +0000)]
R600/SI: Add test for min / max with immediate
Make sure this isn't getting confused by canonicalizations
of comparisons with a constant.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232177
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Fri, 13 Mar 2015 16:39:46 +0000 (16:39 +0000)]
ConstantFold: Fix big shift constant folding
Constant folding for shift IR instructions ignores all bits above 32 of
second argument (shift amount).
Because of that, some undef results are not recognized and APInt can
raise an assert failure if second argument has more than 64 bits.
Patch by Paweł Bylica!
Differential Revision: http://reviews.llvm.org/D7701
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232176
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Fri, 13 Mar 2015 12:45:09 +0000 (12:45 +0000)]
Recommit r232027 with PR22883 fixed: Add infrastructure for support of multiple memory constraints.
The operand flag word for ISD::INLINEASM nodes now contains a 15-bit
memory constraint ID when the operand kind is Kind_Mem. This constraint
ID is a numeric equivalent to the constraint code string and is converted
with a target specific hook in TargetLowering.
This patch maps all memory constraints to InlineAsm::Constraint_m so there
is no functional change at this point. It just proves that using these
previously unused bits in the encoding of the flag word doesn't break
anything.
The next patch will make each target preserve the current mapping of
everything to Constraint_m for itself while changing the target independent
implementation of the hook to return Constraint_Unknown appropriately. Each
target will then be adapted in separate patches to use appropriate
Constraint_* values.
PR22883 was caused the matching operands copying the whole of the operand flags
for the matched operand. This included the constraint id which needed to be
replaced with the operand number. This has been fixed with a conversion
function. Following on from this, matching operands also used the operand
number as the constraint id. This has been fixed by looking up the matched
operand and taking it from there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232165
91177308-0d34-0410-b5e6-
96231b3b80d8
Toma Tabacu [Fri, 13 Mar 2015 11:40:01 +0000 (11:40 +0000)]
[mips] [IAS] Refactor MipsTargetStreamer::emitMipsAbiFlags(). NFC.
Summary: Make emitMipsAbiFlags a direct member of MipsTargetELFStreamer, as that's the only place where it's used, and remove the empty implementations from MipsTargetStreamer and MipsTargetAsmStreamer.
Reviewers: dsanders, rafael
Reviewed By: rafael
Subscribers: rafael, llvm-commits
Differential Revision: http://reviews.llvm.org/D8199
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232161
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 13 Mar 2015 07:09:33 +0000 (07:09 +0000)]
Teach TBAA analysis to report errors on cyclic TBAA metadata rather than hanging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232144
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Fri, 13 Mar 2015 06:41:26 +0000 (06:41 +0000)]
Fix an infinite recursion in the verifier caused by calling isSized on a recursive type.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232143
91177308-0d34-0410-b5e6-
96231b3b80d8
Hao Liu [Fri, 13 Mar 2015 05:15:23 +0000 (05:15 +0000)]
[MachineCopyPropagation] Fix a bug causing incorrect removal for the instruction sequences as follows
%Q5_Q6<def> = COPY %Q2_Q3
%D5<def> =
%D3<def> =
%D3<def> = COPY %D6 // Incorrectly removed in MachineCopyPropagation
Using of %D3 results in incorrect result ...
Reviewed in http://reviews.llvm.org/D8242
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232142
91177308-0d34-0410-b5e6-
96231b3b80d8
Richard Smith [Fri, 13 Mar 2015 03:56:27 +0000 (03:56 +0000)]
Fix build break in this code. Nothing uses this header, but the modules
buildbot builds it anyway and was angry because of this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232139
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Fri, 13 Mar 2015 01:58:14 +0000 (01:58 +0000)]
Updating GettingStarted documentation to reference CMake as the preferred way to build LLVM.
Reviewers: chandlerc, samsonov, echristo
Reviewed By: samsonov
Subscribers: emaste, joker.eph, llvm-commits
Differential Revision: http://reviews.llvm.org/D8046
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232135
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Fri, 13 Mar 2015 01:37:52 +0000 (01:37 +0000)]
When forming an addrec out of a phi don't just look at the last computation and steal its flags for our own, there may be other computations in the middle. Check whether the LHS of the computation is the phi itself and then we know it's safe to steal the flags. Fixes PR22795.
There's a missed optimization opportunity where we could look at the full chain of computation and take the intersection of the flags instead of only looking one instruction deep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232134
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Mar 2015 01:26:39 +0000 (01:26 +0000)]
Use the variable names from the TargetInstrInfo source when we
reference them in the generated files. A few characters aren't huge
here and CFSetupOpcode is much more readable than S0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232132
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Mar 2015 01:10:08 +0000 (01:10 +0000)]
Add a return after the llvm namespace code for a little extra
readability in generated files.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232131
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Mar 2015 00:49:50 +0000 (00:49 +0000)]
Use the cached subtarget off of the machine function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232129
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 13 Mar 2015 00:38:19 +0000 (00:38 +0000)]
Use the cached subtarget off of the machine function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232128
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 12 Mar 2015 23:16:18 +0000 (23:16 +0000)]
[X86, AVX2] Replace inserti128 and extracti128 intrinsics with generic shuffles
This should complete the job started in r231794 and continued in r232045:
We want to replace as much custom x86 shuffling via intrinsics
as possible because pushing the code down the generic shuffle
optimization path allows for better codegen and less complexity
in LLVM.
AVX2 introduced proper integer variants of the hacked integer insert/extract
C intrinsics that were created for this same functionality with AVX1.
This should complete the removal of insert/extract128 intrinsics.
The Clang precursor patch for this change was checked in at r232109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232120
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 23:13:03 +0000 (23:13 +0000)]
Move a variable into the assert where it's used - fixes a -Asserts
build warning/error.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232119
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 22:48:50 +0000 (22:48 +0000)]
In preparation for moving ARM's TargetRegisterInfo to the TargetMachine
merge Thumb1RegisterInfo and Thumb2RegisterInfo. This will enable
us to match the TargetMachine for our TargetRegisterInfo classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232117
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 12 Mar 2015 21:42:03 +0000 (21:42 +0000)]
Removed useless palignr test - we don't actually provide a llvm.x86.ssse3.palign.r.128 intrinsic
Differential Revision: http://reviews.llvm.org/D8302
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232108
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 12 Mar 2015 21:34:28 +0000 (21:34 +0000)]
R600/SI: Don't print scc reg in sopc assembly string
This is how the proprietary driver prints sopc instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232106
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Thu, 12 Mar 2015 21:34:22 +0000 (21:34 +0000)]
R600/SI: Remove _e32 and _e64 suffixes from mnemonics
Instead print them as part of the $dst operand. The AsmMatcher
requires the 32-bit and 64-bit encodings have the same mnemonic in
order to parse them correctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232105
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Thu, 12 Mar 2015 21:32:59 +0000 (21:32 +0000)]
Adding WinEHPrepare tests (currently XFAILs)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232104
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 21:04:46 +0000 (21:04 +0000)]
Migrate the AArch64 TargetRegisterInfo to its TargetMachine
implementation. This requires a bit of scaffolding and a few fixups
that'll go away once all of the ports have been migrated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232103
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 21:04:42 +0000 (21:04 +0000)]
Remove unused headers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232102
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 12 Mar 2015 20:38:10 +0000 (20:38 +0000)]
Unxfail passing test on Hexagon
test/CodeGen/Generic/2008-02-20-MatchingMem.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232098
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Thu, 12 Mar 2015 20:09:39 +0000 (20:09 +0000)]
Revert "r232027 - Add infrastructure for support of multiple memory constraints"
This (r232027) has caused PR22883; so it seems those bits might be used by
something else after all. Reverting until we can figure out what else to do.
Original commit message:
The operand flag word for ISD::INLINEASM nodes now contains a 15-bit
memory constraint ID when the operand kind is Kind_Mem. This constraint
ID is a numeric equivalent to the constraint code string and is converted
with a target specific hook in TargetLowering.
This patch maps all memory constraints to InlineAsm::Constraint_m so there
is no functional change at this point. It just proves that using these
previously unused bits in the encoding of the flag word doesn't break anything.
The next patch will make each target preserve the current mapping of
everything to Constraint_m for itself while changing the target independent
implementation of the hook to return Constraint_Unknown appropriately. Each
target will then be adapted in separate patches to use appropriate Constraint_*
values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232093
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Thu, 12 Mar 2015 19:56:25 +0000 (19:56 +0000)]
[autoconf] Fix the build failure by quoting the strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232090
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Thu, 12 Mar 2015 19:34:12 +0000 (19:34 +0000)]
[X86] Fix a regression introduced by r223641.
The permps and permd instructions have their operands swapped compared to the
intrinsic definition. Therefore, they do not fall into the INTR_TYPE_2OP
category.
I did not create a new category for those two, as they are the only one AFAICT
in that case.
<rdar://problem/
20108262>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232085
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 12 Mar 2015 18:45:10 +0000 (18:45 +0000)]
Reapply "[dsymutil] Gather function ranges during DIE selection."
This reverts commit r231967 which reinstates r231957.
Now that IntervalMap uses explicitely aligned storage, it should be safe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232080
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Thu, 12 Mar 2015 18:45:07 +0000 (18:45 +0000)]
[ADT] IntervalMap: use AlignedCharArrayUnion.
Currently IntervalMap would assert when used with keys bigger than host
pointers. This patch uses the AlignedCharArrayUnion functionality to
overcome that limitation.
Differential Revision: http://reviews.llvm.org/D8268
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232079
91177308-0d34-0410-b5e6-
96231b3b80d8
Yaron Keren [Thu, 12 Mar 2015 18:39:54 +0000 (18:39 +0000)]
Add missing include guards.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232078
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 18:23:01 +0000 (18:23 +0000)]
Fix comment formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232076
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 17:54:19 +0000 (17:54 +0000)]
Remove the need to cache the subtarget in the X86 TargetRegisterInfo
classes. Use a Triple instead and simplify a lot of the querying
logic to use lookups on the Triple.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232071
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 12 Mar 2015 17:33:34 +0000 (17:33 +0000)]
Refactoring CMake CrossCompile module.
* put most of the cross-compiling support into a function llvm_create_cross_target_internal.
* when CrossCompile is included it still generates a NATIVE target.
* llvm_create_cross_target function takes a target_name which should match a toolchain.
* llvm_create_cross_target can now be used to target more than one cross-compilation target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232067
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Thu, 12 Mar 2015 17:26:27 +0000 (17:26 +0000)]
[docs] Update the doxygen configuration file.
Update the doxygen configuration file and Makefile build rules
to provide better output (simply use the default stylesheet and template
from the Doxygen distribution.)
This CL has upgrade doxygen.cfg.in to Doxygen 1.8.6.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232064
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Thu, 12 Mar 2015 17:25:25 +0000 (17:25 +0000)]
[autoconf] Regenerate autoconf configure script.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232063
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Thu, 12 Mar 2015 17:25:01 +0000 (17:25 +0000)]
[autoconf] Refine doxygen document options.
This CL adds --enable-doxygen-search to enable doxygen search engine
and --enable-doxygen-qt-help to enable the Qt help file generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232062
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 12 Mar 2015 16:44:50 +0000 (16:44 +0000)]
Remove unused complex patterns for addressing modes on Hexagon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232057
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 12 Mar 2015 16:29:58 +0000 (16:29 +0000)]
make an array of constants explicitly const
Suggested by Craig Topper in D8184.
This goes with r232047.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232056
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Bieneman [Thu, 12 Mar 2015 16:19:16 +0000 (16:19 +0000)]
Doing some cleanup to the iOS toolchain.
* There is no reason to require SDKROOT as an environment variable because we can derive it from xcrun
* Setting CMAKE_RANLIB makes our static archives usable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232053
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 12 Mar 2015 15:27:07 +0000 (15:27 +0000)]
IRBuilder: add a CreateShuffleVector function that takes an ArrayRef of int
This is a convenience function to ease mask creation of ShuffleVectors
in AutoUpgrade and other places.
Differential Revision: http://reviews.llvm.org/D8184
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232047
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrea Di Biagio [Thu, 12 Mar 2015 15:16:58 +0000 (15:16 +0000)]
[X86] Fix wrong target specific combine on SETCC nodes.
Part of the folding logic implemented by function 'PerformISDSETCCCombine'
only worked under the assumption that the condition code in input could have
been either SETNE or SETEQ.
Unfortunately that assumption was incorrect, and in some cases the algorithm
ended up incorrectly folding SETCC nodes.
The incorrect folding only affected SETCC dag nodes where:
- one of the operands was a build_vector of all zeroes;
- the other operand was a SIGN_EXTEND from a vector of MVT:i1 elements;
- the condition code was neither SETNE nor SETEQ.
Example:
(setcc (v4i32 (sign_extend v4i1:%A)), (v4i32 VectorOfAllZeroes), setge)
Before this patch, the entire dag node sequence from the example was
incorrectly folded to node %A.
With this patch, the dag node sequence is folded to a
(xor %A, (v4i1 VectorOfAllOnes)).
Added test setcc-combine.ll.
Thanks to Greg Bedwell for spotting this issue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232046
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Thu, 12 Mar 2015 15:15:19 +0000 (15:15 +0000)]
[X86, AVX] replace vextractf128 intrinsics with generic shuffles
Now that we've replaced the vinsertf128 intrinsics,
do the same for their extract twins.
This is very much like D8086 (checked in at r231794):
We want to replace as much custom x86 shuffling via intrinsics
as possible because pushing the code down the generic shuffle
optimization path allows for better codegen and less complexity
in LLVM.
This is also the LLVM sibling to the cfe D8275 patch.
Differential Revision: http://reviews.llvm.org/D8276
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232045
91177308-0d34-0410-b5e6-
96231b3b80d8
Aaron Ballman [Thu, 12 Mar 2015 13:24:06 +0000 (13:24 +0000)]
Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232035
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Pilgrim [Thu, 12 Mar 2015 13:12:33 +0000 (13:12 +0000)]
[X86][AVX2] Added missing palignr stack folding test
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232033
91177308-0d34-0410-b5e6-
96231b3b80d8
Daniel Sanders [Thu, 12 Mar 2015 11:00:48 +0000 (11:00 +0000)]
Add infrastructure for support of multiple memory constraints.
Summary:
The operand flag word for ISD::INLINEASM nodes now contains a 15-bit
memory constraint ID when the operand kind is Kind_Mem. This constraint
ID is a numeric equivalent to the constraint code string and is converted
with a target specific hook in TargetLowering.
This patch maps all memory constraints to InlineAsm::Constraint_m so there
is no functional change at this point. It just proves that using these
previously unused bits in the encoding of the flag word doesn't break anything.
The next patch will make each target preserve the current mapping of
everything to Constraint_m for itself while changing the target independent
implementation of the hook to return Constraint_Unknown appropriately. Each
target will then be adapted in separate patches to use appropriate Constraint_*
values.
Reviewers: hfinkel
Reviewed By: hfinkel
Subscribers: hfinkel, jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D8171
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232027
91177308-0d34-0410-b5e6-
96231b3b80d8
Davide Italiano [Thu, 12 Mar 2015 07:48:25 +0000 (07:48 +0000)]
[Object/ELF] Add support for setVisibility()
This is a prerequisite to implement symbol visibility for ELF
in lld.
Differential Revision: http://reviews.llvm.org/D8279
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232020
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Thu, 12 Mar 2015 07:28:41 +0000 (07:28 +0000)]
AVX-512: Added encoding tests for VPROR, VPROL instructions,
fixed opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232018
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 06:07:16 +0000 (06:07 +0000)]
Remove some unnecessary forward declarations and put a couple more
where they're supposed to reside.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232014
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 05:55:26 +0000 (05:55 +0000)]
Remove the need to cache the subtarget in the Sparc TargetRegisterInfo
classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232013
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 05:43:57 +0000 (05:43 +0000)]
Remove the need to cache the subtarget in the Mips TargetRegisterInfo
classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232012
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Qin [Thu, 12 Mar 2015 05:36:01 +0000 (05:36 +0000)]
Reapply 'Run LICM pass after loop unrolling pass.'
It's firstly committed at r231630, and reverted at r231635.
Function pass InstructionSimplifier is inserted as barrier to
make sure loop unroll pass won't affect on LICM pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232011
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 05:12:31 +0000 (05:12 +0000)]
Remove the need to cache the subtarget in the ARM TargetRegisterInfo
classes. Replace the frame pointer initialization with a static function
that'll look it up via the subtarget on the MachineFunction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232010
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 12 Mar 2015 04:43:01 +0000 (04:43 +0000)]
docs: Fix a typo in my previous commit
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232009
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 12 Mar 2015 04:18:21 +0000 (04:18 +0000)]
docs: Document the llvm-cov show and report commands
Add a basic synopsis of how to work with instrprof based coverage
using the llvm-cov tools.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232007
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 02:04:46 +0000 (02:04 +0000)]
Remove the need to cache the subtarget in the AArch64 TargetRegisterInfo
classes. Replace it with a cache to the Triple and use that
where applicable at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232005
91177308-0d34-0410-b5e6-
96231b3b80d8
Jingyue Wu [Thu, 12 Mar 2015 01:50:30 +0000 (01:50 +0000)]
[NVPTXAsmPrinter] do not print .align on function headers
Summary:
PTX does not allow .align directives on function headers.
Fixes PR21551.
Test Plan: test/Codegen/NVPTX/function-align.ll
Reviewers: eliben, jholewinski
Reviewed By: eliben, jholewinski
Subscribers: llvm-commits, eliben, jpienaar, jholewinski
Differential Revision: http://reviews.llvm.org/D8274
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232004
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 12 Mar 2015 01:45:37 +0000 (01:45 +0000)]
Make llvm.eh.actions an intrinsic and add docs for it
These docs *don't* match the way WinEHPrepare uses them yet, and
verifier support isn't implemented either. The implementation will come
after the documentation text is reviewed and agreed upon.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232003
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 01:42:51 +0000 (01:42 +0000)]
Remove the need to cache the subtarget in the PowerPC TargetRegisterInfo
classes. Replace it with a cache to the TargetMachine and use that
where applicable at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232002
91177308-0d34-0410-b5e6-
96231b3b80d8
Justin Bogner [Thu, 12 Mar 2015 01:38:50 +0000 (01:38 +0000)]
docs: Try to fix a couple of internal links in the llvm-profdata manual
These links seem broken on llvm.org/docs. Change them to use the
sphinx-recommended style to see if that helps.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232001
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 12 Mar 2015 01:38:48 +0000 (01:38 +0000)]
Remove some CHECK-NOT lines in favor of CHECK-NEXT
NFC, this is just shorter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@232000
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Thu, 12 Mar 2015 01:25:29 +0000 (01:25 +0000)]
Update for a new year.
Patch by Tanya Lattner.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231998
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 12 Mar 2015 00:49:13 +0000 (00:49 +0000)]
Fix build break introduced in r231992
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231996
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Thu, 12 Mar 2015 00:36:20 +0000 (00:36 +0000)]
Stop calling DwarfEHPrepare from WinEHPrepare
Instead, run both EH preparation passes, and have them both ignore
functions with unrecognized EH personalities. Pass delegation involved
some hacky code for creating an AnalysisResolver that we don't need now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231995
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Thu, 12 Mar 2015 00:19:59 +0000 (00:19 +0000)]
Eliminate constant-extender profitability checks from Hexagon isel
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231992
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 12 Mar 2015 00:07:29 +0000 (00:07 +0000)]
Fix FileCheck: substr() expect the length of the string as 2nd arg
The code assumed that substr() was taking start,end while it takes
start,length.
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231988
91177308-0d34-0410-b5e6-
96231b3b80d8
Mehdi Amini [Thu, 12 Mar 2015 00:07:24 +0000 (00:07 +0000)]
Move the DataLayout to the generic TargetMachine, making it mandatory.
Summary:
I don't know why every singled backend had to redeclare its own DataLayout.
There was a virtual getDataLayout() on the common base TargetMachine, the
default implementation returned nullptr. It was not clear from this that
we could assume at call site that a DataLayout will be available with
each Target.
Now getDataLayout() is no longer virtual and return a pointer to the
DataLayout member of the common base TargetMachine. I plan to turn it into
a reference in a future patch.
The only backend that didn't have a DataLayout previsouly was the CPPBackend.
It now initializes the default DataLayout. This commit is NFC for all the
other backends.
Test Plan: clang+llvm ninja check-all
Reviewers: echristo
Subscribers: jfb, jholewinski, llvm-commits
Differential Revision: http://reviews.llvm.org/D8243
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231987
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 11 Mar 2015 23:39:36 +0000 (23:39 +0000)]
Fix some clang warnings in WinEHPrepare
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231985
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Kleckner [Wed, 11 Mar 2015 23:36:10 +0000 (23:36 +0000)]
Handle big index in getelementptr instruction
CodeGen incorrectly ignores (assert from APInt) constant index bigger
than 2^64 in getelementptr instruction. This is a test and fix for that.
Patch by Paweł Bylica!
Reviewed By: rnk
Subscribers: majnemer, rnk, mcrosier, resistor, llvm-commits
Differential Revision: http://reviews.llvm.org/D8219
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231984
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Wed, 11 Mar 2015 23:28:38 +0000 (23:28 +0000)]
[PowerPC] Remove canFoldAsLoad from instruction definitions
The PowerPC backend had a number of loads that were marked as canFoldAsLoad
(and I'm partially at fault here for copying around the relevant line of
TableGen definitions without really looking at what it meant). This is not
right; PPC (non-memory) instructions don't support direct memory operands, and
so there is nothing a 'foldable' instruction could be folded into.
Noticed by inspection, no test case.
The one thing we might lose by doing this is ability to fold some loads into
stackmap/patchpoint pseudo-instructions. However, this was untested, and would
not obviously have worked for extending loads, and I'd rather re-add support
for that once it can be tested.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231982
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 11 Mar 2015 23:22:06 +0000 (23:22 +0000)]
Extended support for native Windows C++ EH outlining
Differential Review: http://reviews.llvm.org/D7886
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231981
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 11 Mar 2015 22:56:10 +0000 (22:56 +0000)]
Remove useMachineScheduler and replace it with subtarget options
that control, individually, all of the disparate things it was
controlling.
At the same time move a FIXME in the Hexagon port to a new
subtarget function that will enable a user of the machine
scheduler to avoid using the source scheduler for pre-RA-scheduling.
The FIXME would have this removed, but involves either testcase
changes or adding -pre-RA-sched=source to a few testcases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231980
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 11 Mar 2015 22:42:13 +0000 (22:42 +0000)]
Have getCallPreservedMask and getThisCallPreservedMask take a
MachineFunction argument so that we can grab subtarget specific
features off of it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231979
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 11 Mar 2015 22:24:37 +0000 (22:24 +0000)]
One more getCalleeSavedRegs prototype with nullptr.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231977
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Wed, 11 Mar 2015 22:06:32 +0000 (22:06 +0000)]
Add the option, -info-plist to llvm-objdump used with -macho to print the
Mach-O info plist section as strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231974
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 11 Mar 2015 21:41:28 +0000 (21:41 +0000)]
Have getCalleeSavedRegs take a non-null MachineFunction all the
time. The target independent code was passing in one all the
time and targets weren't checking validity before using. Update
a few calls to pass in a MachineFunction where necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231970
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Wed, 11 Mar 2015 21:40:25 +0000 (21:40 +0000)]
Constify AArch64CollectLOH.cpp. NFC
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231969
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 11 Mar 2015 21:17:41 +0000 (21:17 +0000)]
Revert "[dsymutil] Gather function ranges during DIE selection."
This reverts commit r231957.
IntervalMap currently doesn't support keys more aligned than host pointers
and I've been using it with uint64_t keys. This asserts on some 32bits
systems.
Revert while I work on an IntervalMap generalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231967
91177308-0d34-0410-b5e6-
96231b3b80d8
Jozef Kolek [Wed, 11 Mar 2015 20:28:31 +0000 (20:28 +0000)]
[mips][microMIPS] Make usage of NOT16 by code generator
Differential Revision: http://reviews.llvm.org/D7748
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231963
91177308-0d34-0410-b5e6-
96231b3b80d8
Sanjay Patel [Wed, 11 Mar 2015 20:12:07 +0000 (20:12 +0000)]
add CHECK-LABELs for better reliability
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231962
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Wed, 11 Mar 2015 19:58:37 +0000 (19:58 +0000)]
Put jump tables in unique sections on COFF.
If a function is going in an unique section (because of -ffunction-sections
for example), putting a jump table in .rodata will keep .rodata alive and
that will keep alive any other function that also has a jump table.
Instead, put the jump table in a unique section that is associated with the
function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231961
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Wed, 11 Mar 2015 18:54:22 +0000 (18:54 +0000)]
ARM: simplify and extend byval handling
The main issue being fixed here is that APCS targets handling a "byval align N"
parameter with N > 4 were miscounting what objects were where on the stack,
leading to FrameLowering setting the frame pointer incorrectly and clobbering
the stack.
But byval handling had grown over many years, and had multiple layers of cruft
trying to compensate for each other and calculate padding correctly. This only
really needs to be done once, in the HandleByVal function. Elsewhere should
just do what it's told by that call.
I also stripped out unnecessary APCS/AAPCS distinctions (now that Clang emits
byvals with the correct C ABI alignment), which simplified HandleByVal.
rdar://
20095672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231959
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 11 Mar 2015 18:46:01 +0000 (18:46 +0000)]
[dsymutil] Add missing headers.
No build failure, found by code inspection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231958
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 11 Mar 2015 18:45:59 +0000 (18:45 +0000)]
[dsymutil] Gather function ranges during DIE selection.
Gather the function ranges [low_pc, high_pc) during DIE selection and
store them along with the offset to apply to them to get the linked
addresses.
This is just the data collection part, it comes with no tests. That
information will be used in multiple followup commits to perform the
relocation of line tables and range sections among other things, and
these commits will add tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231957
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 11 Mar 2015 18:45:57 +0000 (18:45 +0000)]
[dsymutil] Small clang-format patch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231956
91177308-0d34-0410-b5e6-
96231b3b80d8
Frederic Riss [Wed, 11 Mar 2015 18:45:52 +0000 (18:45 +0000)]
[dsymutil] Correctly clone address attributes.
DW_AT_low_pc on functions is taken care of by the relocation processing, but
DW_AT_high_pc and DW_AT_low_pc on other lexical scopes need special handling.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231955
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 11 Mar 2015 18:43:21 +0000 (18:43 +0000)]
Remove the need to cache the subtarget in the R600 TargetRegisterInfo
classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231954
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Wed, 11 Mar 2015 18:34:58 +0000 (18:34 +0000)]
Have getRegPressureSetLimit take a MachineFunction so that a
we can inspect the subtarget and function when computing values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231951
91177308-0d34-0410-b5e6-
96231b3b80d8
David Majnemer [Wed, 11 Mar 2015 18:03:05 +0000 (18:03 +0000)]
InstCombine: Don't fold call bitcast into args if callee is byval
This fixes a bug reported here:
http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-
20150309/265341.html
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231948
91177308-0d34-0410-b5e6-
96231b3b80d8
Kit Barton [Wed, 11 Mar 2015 17:43:43 +0000 (17:43 +0000)]
Updated with list of possible improvements we are tracking internally
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231946
91177308-0d34-0410-b5e6-
96231b3b80d8
Juergen Ributzka [Wed, 11 Mar 2015 17:29:03 +0000 (17:29 +0000)]
Add the "vbroadcasti128" instruction back.
This is a follow-up to r231182. This adds the "vbroadcasti128" instruction
back, but without the intrinsic mapping. Also add a test to check the
instriction encoding.
This is related to rdar://problem/
18742778.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231945
91177308-0d34-0410-b5e6-
96231b3b80d8
Derek Schuff [Wed, 11 Mar 2015 16:16:09 +0000 (16:16 +0000)]
Make NaCl's use of .init_array for static constructors match Linux
Summary:
The generic ELF TargetObjectFile defaults to .ctors, but Linux's
defaults to .init_array by calling InitializeELF with the value of
UseInitArray from TargetMachine. Make NaCl's behavior match.
Reviewers: jvoung
Differential Revision: http://reviews.llvm.org/D8240
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231934
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Mar 2015 16:09:02 +0000 (16:09 +0000)]
Wrap in __MINGW32__ to avoid warnings from msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231933
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Mar 2015 15:53:24 +0000 (15:53 +0000)]
Add missing namespace specifier for MSVC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231930
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 11 Mar 2015 15:41:15 +0000 (15:41 +0000)]
RtlCaptureContext is absent from the mingw32 headers, provide a prototype.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@231929
91177308-0d34-0410-b5e6-
96231b3b80d8