Chandler Carruth [Tue, 30 Oct 2012 20:52:40 +0000 (20:52 +0000)]
Fix PR14212: For some strange reason I treated vectors differently from
integers in that the code to handle split alloca-wide integer loads or
stores doesn't come first. It should, for the same reasons as with
integers, and the PR attests to that. Also had to fix a busted assert in
that this test case also covers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167051
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 30 Oct 2012 20:39:19 +0000 (20:39 +0000)]
[inline asm] Get the mayLoad/mayStore directly from the MIOp_ExtraInfo operand.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167050
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 20:17:37 +0000 (20:17 +0000)]
BBVectorize: Cache fixed-order pairs instead of recomputing pointer info.
Instead of recomputing relative pointer information just prior to fusing,
cache this information (which also needs to be computed during the
candidate-pair selection process). This cuts down on the total number of
SE queries made, and also is a necessary intermediate step on the road toward
including shuffle costs in the pair selection procedure.
No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167049
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Oct 2012 20:16:31 +0000 (20:16 +0000)]
[mips] Allow tail-call optimization for vararg functions and functions which
use the caller's stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 30 Oct 2012 20:01:12 +0000 (20:01 +0000)]
Add a comment for r167040.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167046
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 30 Oct 2012 19:49:39 +0000 (19:49 +0000)]
LoopIdiom: Fix a serious missed optimization: we only turned top-level loops into memmove.
Thanks to Preston Briggs for catching this!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167045
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 19:47:37 +0000 (19:47 +0000)]
BBVectorize: Fix a small bug introduced in r167042.
We need to make sure that we take the correct load/store alignment
when the inputs are flipped.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167044
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Oct 2012 19:37:25 +0000 (19:37 +0000)]
Add code for saving formal argument information to MipsFunctionInfo. This
information will be used by IsEligibleForTailCallOptimization to determine
whether a call can be tail-call optimized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167043
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 19:35:29 +0000 (19:35 +0000)]
BBVectorize: Simplify how input swapping is handled.
Stop propagating the FlipMemInputs variable into the routines that
create the replacement instructions. Instead, just flip the arguments
of those routines. This allows for some associated cleanup (not all
of which is done here). No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167042
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Oct 2012 19:23:25 +0000 (19:23 +0000)]
Add definition of function MipsTargetLowering::passArgOnStack which emits nodes
for passing a function call argument on a stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167041
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 30 Oct 2012 19:11:54 +0000 (19:11 +0000)]
[inline asm] Implement mayLoad and mayStore for inline assembly. In general,
the MachineInstr MayLoad/MayLoad flags are based on the tablegen implementation.
For inline assembly, however, we need to compute these based on the constraints.
Revert r166929 as this is no longer needed, but leave the test case in place.
rdar://
12033048 and PR13504
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167040
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 30 Oct 2012 19:07:58 +0000 (19:07 +0000)]
Do not do tail-call optimization if target is mips16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167039
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 18:55:49 +0000 (18:55 +0000)]
BBVectorize: Don't make calls to SE when the result is unused.
SE was being called during the instruction-fusion process (when the result
is unreliable, and thus ignored). No functionality change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167037
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Oct 2012 18:37:43 +0000 (18:37 +0000)]
80-col
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167036
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Oct 2012 18:36:45 +0000 (18:36 +0000)]
LoopVectorize: Add support for write-only loops when the write destination is a single pointer.
Speedup SciMark by 1%
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167035
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Tue, 30 Oct 2012 18:29:42 +0000 (18:29 +0000)]
PowerPC: Expand FSRQT for vector types
This patch expands FSQRT for floating point vector types when altivec is
used.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167034
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Oct 2012 18:12:36 +0000 (18:12 +0000)]
LoopVectorize: Fix a bug in the initialization of reduction variables. AND needs to start at all-one
while XOR, and OR need to start at zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167032
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 30 Oct 2012 18:07:58 +0000 (18:07 +0000)]
Set %defaultjit to use MCJIT for PowerPC targets.
Update Transforms/LICM/2003-12-11-SinkingToPHI.ll test to use
%defaultjit as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167031
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Tue, 30 Oct 2012 17:51:02 +0000 (17:51 +0000)]
Fix grammar.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167029
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Tue, 30 Oct 2012 17:33:39 +0000 (17:33 +0000)]
Enable ELF machine type to be specified explicitly in X86 backend
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167027
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Tue, 30 Oct 2012 16:32:52 +0000 (16:32 +0000)]
Change ForceSizeOpt attribute into MinSize attribute
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167020
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 30 Oct 2012 16:03:32 +0000 (16:03 +0000)]
Fix isEliminableCastPair to work correctly in the presence of pointers
with different sizes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167018
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 30 Oct 2012 15:11:52 +0000 (15:11 +0000)]
switch_to_lookup_table.ll: Remove some unnecessary lines, comments,
function attributes, etc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167016
91177308-0d34-0410-b5e6-
96231b3b80d8
Adhemerval Zanella [Tue, 30 Oct 2012 13:50:19 +0000 (13:50 +0000)]
PowerPC: More support for Altivec compare operations
This patch adds more support for vector type comparisons using altivec.
It adds correct support for v16i8, v8i16, v4i32, and v4f32 vector
types for comparison operators ==, !=, >, >=, <, and <=.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167015
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Tue, 30 Oct 2012 13:38:54 +0000 (13:38 +0000)]
Add a helper for telling whether a type is a pointer or vector of pointer type.
Simplify the implementation of the corresponding integer and float functions and
move them inline while there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167014
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Tue, 30 Oct 2012 12:33:18 +0000 (12:33 +0000)]
Enable some additional constant folding for PPCDoubleDouble.
This fixes Clang :: CodeGen/complex-builtints.c on PowerPC.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167013
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Tue, 30 Oct 2012 11:23:25 +0000 (11:23 +0000)]
Use TargetTransformInfo to control switch-to-lookup table transformation
When the switch-to-lookup tables transform landed in SimplifyCFG, it
was pointed out that this could be inappropriate for some targets.
Since there was no way at the time for the pass to know anything about
the target, an awkward reverse-transform was added in CodeGenPrepare
that turned lookup tables back into switches for some targets.
This patch uses the new TargetTransformInfo to determine if a
switch should be transformed, and removes
CodeGenPrepare::ConvertLoadToSwitch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167011
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Tue, 30 Oct 2012 02:41:57 +0000 (02:41 +0000)]
Remove an invalid assert in TargetTransformImpl
getCastInstrCost had an assert prohibiting scalar to vector casts. Such casts,
however, are allowed. This should make the vectorizer buildbot happier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166998
91177308-0d34-0410-b5e6-
96231b3b80d8
Sid Manning [Tue, 30 Oct 2012 02:26:15 +0000 (02:26 +0000)]
* Add e_flags enum for Hexagon
* Add Hexagon specific section indexes for small data
- Reviewed by Michael Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166997
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 30 Oct 2012 01:04:51 +0000 (01:04 +0000)]
ARM: Better disassembly for pc-relative LDR.
When the operand is a plain immediate rather than a label, print it
as [pc, #imm] like we do for the Thumb2 wide encoding variant.
rdar://
12154503
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166991
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Tue, 30 Oct 2012 00:54:49 +0000 (00:54 +0000)]
Change mips16 delay slot jumps to non delay slot forms by default.
We will make them delay slot forms if there is something that can be
placed in the delay slot during a separate pass. Mips16 extended instructions
cannot be placed in delay slots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166990
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 30 Oct 2012 00:40:39 +0000 (00:40 +0000)]
LoopVectorizer: change debug prints: Print the module identifier when deciding to vectorize. When deciding not to vectorize do not print the called function name because it can be null.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166989
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 30 Oct 2012 00:01:57 +0000 (00:01 +0000)]
Re-commit r166971. I reverted it to quickly, when buildbots didn't have a chance
to test it with chapni's fix (-mattr=+avx).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166985
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 29 Oct 2012 23:27:20 +0000 (23:27 +0000)]
Fix ARM's b.w instruction for thumb 2 and the encoding T4. The branch target
is 24 bits not 20 and the decoding needed to correctly handle converting the
J1 and J2 bits to their I1 and I2 values to reconstruct the displacement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166982
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 23:13:50 +0000 (23:13 +0000)]
Revert r166971. It causes buildbot failure. To be investigated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166979
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Oct 2012 22:45:18 +0000 (22:45 +0000)]
llvm/test/CodeGen/X86/vec_shuffle-30.ll: Try to unbreak builds - assuming +avx.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166974
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 22:04:32 +0000 (22:04 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166973
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 22:02:26 +0000 (22:02 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166972
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 21:56:35 +0000 (21:56 +0000)]
Allow to fold vector load if there is more than one bitcast, so in the case:
%0 = load <8 x i16>* %dest
%1 = shufflevector <8 x i16> %0, <8 x i16> %in,
<8 x i32> < i32 0, i32 1, i32 2, i32 3, i32 13, i32 undef, i32 14, i32 14>
store <8 x i16> %1, <8 x i16>* %dest
We get:
vmovlpd (%eax), %xmm0, %xmm0
instead of:
vmovaps (%eax), %xmm1
vmovsd %xmm1, %xmm0, %xmm0
No extra test-case is added. I just fixed the existing one
(also it uses FileCheck now).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166971
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Oct 2012 21:52:38 +0000 (21:52 +0000)]
LoopVectorize: Update and preserve the dominator tree info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166970
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Mon, 29 Oct 2012 21:49:46 +0000 (21:49 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166969
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Mon, 29 Oct 2012 21:18:16 +0000 (21:18 +0000)]
This patch solves a problem with passing varargs parameters under the PPC64
ELF ABI.
A varargs parameter consisting of a single-precision floating-point value,
or of a single-element aggregate containing a single-precision floating-point
value, must be passed in the low-order (rightmost) four bytes of the
doubleword stack slot reserved for that parameter. If there are GPR protocol
registers remaining, the parameter must also be mirrored in the low-order
four bytes of the reserved GPR.
Prior to this patch, such parameters were being passed in the high-order
four bytes of the stack slot and the mirrored GPR.
The patch adds a new test case to verify the correct code generation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166968
91177308-0d34-0410-b5e6-
96231b3b80d8
Simon Atanasyan [Mon, 29 Oct 2012 19:49:45 +0000 (19:49 +0000)]
Add mips64-* and mips64el-* triples to configure scripts
as valid triples denote Mips target.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166961
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 29 Oct 2012 19:39:04 +0000 (19:39 +0000)]
Implement patterns for extloadi8 and extloadi16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166960
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 18:35:49 +0000 (18:35 +0000)]
In various places throughout the code generator, there were special
checks to avoid performing compile-time arithmetic on PPCDoubleDouble.
Now that APFloat supports arithmetic on PPCDoubleDouble, those checks
are no longer needed, and we can treat the type like any other.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166958
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 18:18:44 +0000 (18:18 +0000)]
APFloat cleanup: Remove now unused "arithmeticOK" logic.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166954
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 29 Oct 2012 18:18:26 +0000 (18:18 +0000)]
Remove redundant test case from r166949, per Eli's suggestion.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166953
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 18:17:42 +0000 (18:17 +0000)]
APFloat cleanup: Remove now unused fields "sign2" and "exponent2".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166952
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 18:09:01 +0000 (18:09 +0000)]
Implement arithmetic on APFloat with PPCDoubleDouble semantics by
treating it as if it were an IEEE floating-point type with 106-bit
mantissa.
This makes compile-time arithmetic on "long double" for PowerPC
in clang (in particular parsing of floating point constants)
work, and fixes all "long double" related failures in the test
suite.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166951
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Mon, 29 Oct 2012 18:01:54 +0000 (18:01 +0000)]
[ms-inline asm] Add support for the [] operator. Essentially, [expr1][expr2] is
equivalent to [expr1 + expr2]. See test cases for more examples.
rdar://
12470392
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166949
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Oct 2012 18:01:14 +0000 (18:01 +0000)]
Rename the BB-vectorize flag to match the dragonegg name
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166948
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Mon, 29 Oct 2012 17:57:12 +0000 (17:57 +0000)]
Fix PR14204
- Add missing pattern on X86ISD::VZEXT from VR256 to VR256 when AVX2 is enabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166947
91177308-0d34-0410-b5e6-
96231b3b80d8
Joerg Sonnenberger [Mon, 29 Oct 2012 17:56:15 +0000 (17:56 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166945
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 29 Oct 2012 17:51:52 +0000 (17:51 +0000)]
Completely disallow partial copies in adjustCopiesBackFrom().
Partial copies can show up even when CoalescerPair.isPartial() returns
false. For example:
%vreg24:dsub_0<def> = COPY %vreg31:dsub_0; QPR:%vreg24,%vreg31
Such a partial-partial copy is not good enough for the transformation
adjustCopiesBackFrom() needs to do.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166944
91177308-0d34-0410-b5e6-
96231b3b80d8
Ulrich Weigand [Mon, 29 Oct 2012 17:49:34 +0000 (17:49 +0000)]
Allow i32/i64 for 'f' constraint on PowerPC.
This fixes PR12757.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166943
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 17:31:46 +0000 (17:31 +0000)]
Remove a wrapper around getIntPtrType added to GVN by Hal in commit 166624 (the
wrapper returns a vector of integers when passed a vector of pointers) by having
getIntPtrType itself return a vector of integers in this case. Outside of this
wrapper, I didn't find anywhere in the codebase that was relying on the old
behaviour for vectors of pointers, so give this a whirl through the buildbots.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166939
91177308-0d34-0410-b5e6-
96231b3b80d8
Bob Wilson [Mon, 29 Oct 2012 17:27:39 +0000 (17:27 +0000)]
Remove code to saturate profile counts.
We may need to change the way profile counter values are stored, but
saturation is the wrong thing to do. Just remove it for now.
Patch by Alastair Murray!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166938
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Oct 2012 16:36:25 +0000 (16:36 +0000)]
Change the PassManagerBuilder (used by -O3) loop vectorizer flag from -vectorize to -vectorize-loops because we dont want to share the same flag as the bb-vectorizer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166937
91177308-0d34-0410-b5e6-
96231b3b80d8
Hans Wennborg [Mon, 29 Oct 2012 16:26:52 +0000 (16:26 +0000)]
Minor style fixes for TargetTransformationInfo and TargetTransformImpl
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166936
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Mon, 29 Oct 2012 16:16:54 +0000 (16:16 +0000)]
Expand all atomic ops for mips16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166935
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Oct 2012 16:07:28 +0000 (16:07 +0000)]
llvm/Config/config.h.cmake: Good bye, Kevin! We won't honor authors in comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166934
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Oct 2012 15:51:42 +0000 (15:51 +0000)]
PPCSubtarget.h: Add explicit braces.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166932
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Mon, 29 Oct 2012 15:51:35 +0000 (15:51 +0000)]
PPCSubtarget.h: Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166931
91177308-0d34-0410-b5e6-
96231b3b80d8
Preston Gurd [Mon, 29 Oct 2012 15:01:23 +0000 (15:01 +0000)]
This patch addresses a problem with the Post RA scheduler generating an
incorrect instruction sequence due to it not being aware that an
inline assembly instruction may reference memory.
This patch fixes the problem by causing the scheduler to always assume that any
inline assembly code instruction could access memory. This is necessary because
the internal representation of the inline instruction does not include
any information about memory accesses.
This should fix PR13504.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166929
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Mon, 29 Oct 2012 14:59:36 +0000 (14:59 +0000)]
This patch adds alignment information for long double to the 64-bit PowerPC
ELF subtarget.
The existing logic is used as a fallback to avoid any changes to the Darwin
ABI. PPC64 ELF now has two possible data layout strings: one for FreeBSD,
which requires 8-byte alignment, and a default string that requires
16-byte alignment.
I've added a test for PPC64 Linux to verify the 16-byte alignment. If
somebody wants to add a separate test for FreeBSD, that would be great.
Note that there is a companion patch to update the alignment information
in Clang, which I am committing now as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166928
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 14:30:05 +0000 (14:30 +0000)]
Factorize code: rather than duplication the logic in getPointerTypeSizeInBits,
just call getPointerTypeSizeInBits. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166926
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 14:12:44 +0000 (14:12 +0000)]
Loads and stores without an explicit alignment use the abi alignment not the
preferred alignment. Correct the documentation.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166925
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 12:19:04 +0000 (12:19 +0000)]
Rather than duplicating the getPointerSize code just call getPointerSize.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166923
91177308-0d34-0410-b5e6-
96231b3b80d8
Duncan Sands [Mon, 29 Oct 2012 11:29:53 +0000 (11:29 +0000)]
Silence a GCC warning about comparing signed and unsigned types.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166922
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Oct 2012 10:47:07 +0000 (10:47 +0000)]
Align the data section correctly when loading an ELF file.
Patch by Amara Emerson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166920
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Oct 2012 10:47:04 +0000 (10:47 +0000)]
Make use of common-symbol alignment info in ELF loader.
Patch by Amara Emerson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166919
91177308-0d34-0410-b5e6-
96231b3b80d8
Tim Northover [Mon, 29 Oct 2012 10:47:00 +0000 (10:47 +0000)]
Add interface for querying object files for symbol values.
Currently only implemented for ELF.
Patch by Amara Emerson.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166918
91177308-0d34-0410-b5e6-
96231b3b80d8
Evgeniy Stepanov [Mon, 29 Oct 2012 09:39:03 +0000 (09:39 +0000)]
va_start, va_end, va_copy: InstrinsicInst subclasses and InstVisitor support.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166916
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 29 Oct 2012 05:28:35 +0000 (05:28 +0000)]
Calling TLI->getNumRegisters creates a circular dependency when building LLVM using cmake.
Get the number of registers by calling getTypeLegalizationCost.
PR14199.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166911
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Mon, 29 Oct 2012 04:57:52 +0000 (04:57 +0000)]
Remove unused typedef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166910
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Oct 2012 02:23:07 +0000 (02:23 +0000)]
Add -alias and -ralias options to match what we have for functions and
globals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166909
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Oct 2012 01:59:03 +0000 (01:59 +0000)]
llvm-extract changes linkages so that functions on both sides of the
split module can see each other. If it is keeping a symbol that already has
a non local linkage, it doesn't need to change it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166908
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Mon, 29 Oct 2012 00:27:55 +0000 (00:27 +0000)]
llvm-extract was unable to handle aliases. It would leave a copy on the
output of both
llvm-extract foo.ll -func=bar
and
llvm-extract foo.ll -func=bar -delete
so the two new files could not be linked together anymore. With this change
alias are handled almost like functions and global variables. Almost because
with alias we cannot just clear the initializer/body, we have to create a new
declaration and replace the alias with it.
The net result is that now the output of the above commands can be linked
even if foo.ll has aliases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166907
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sun, 28 Oct 2012 23:08:07 +0000 (23:08 +0000)]
Implement brind operator for mips16.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166903
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Sun, 28 Oct 2012 21:34:43 +0000 (21:34 +0000)]
Remove TargetELFWriterInfo.
All the credit goes to Jan Voung for noticing it was dead!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166902
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sun, 28 Oct 2012 06:02:37 +0000 (06:02 +0000)]
This patch is for the implementation of mips16 complex pattern addr16.
Previously mips16 was sharing the pattern addr which is used for mips32
and mips64. This had a number of problems:
1) Storing and loading byte and halfword quantities for mips16 has particular
problems due to the primarily non mips16 nature of SP. When we must
load/store byte/halfword stack objects in a function, we must create a mips16
alias register for SP. This functionality is tested in stchar.ll.
2) We need to have an FP register under certain conditions (such as
dynamically sized alloca). We use mips16 register S0 for this purpose.
In this case, we also use this register when accessing frame objects so this
issue also affects the complex pattern addr16. This functionality is
tested in alloca16.ll.
The Mips16InstrInfo.td has been updated to use addr16 instead of addr.
The complex pattern C++ function for addr has been copied to addr16 and
updated to reflect the above issues.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166897
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Sat, 27 Oct 2012 17:41:27 +0000 (17:41 +0000)]
Never attempt to join an early-clobber def with a regular kill.
This fixes PR14194.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166880
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Oct 2012 15:18:28 +0000 (15:18 +0000)]
LoopIdiom: Add checks to avoid turning memmove into an infinite loop.
I don't think this is possible with the current implementation but that may change eventually.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166877
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Oct 2012 14:25:51 +0000 (14:25 +0000)]
LoopIdiom: Recognize memmove loops.
This turns loops like
for (unsigned i = 0; i != n; ++i)
p[i] = p[i+1];
into memmove, which has a highly optimized implementation in most libcs.
This was really easy with the new DependenceAnalysis :)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166875
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Oct 2012 14:25:44 +0000 (14:25 +0000)]
LoopIdiom: Replace custom dependence analysis with DependenceAnalysis.
Requires a lot less code and complexity on loop-idiom's side and the more
precise analysis can catch more cases, like the one I included as a test case.
This also fixes the edge-case miscompilation from PR9481.
Compile time performance seems to be slightly worse, but this is mostly due
to an extra LCSSA run scheduled by the PassManager and should be fixed there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166874
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Oct 2012 11:36:07 +0000 (11:36 +0000)]
SCEV validator: Ignore CouldNotCompute/undef on both sides. This is mostly noise and blocks finding more severe bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166873
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sat, 27 Oct 2012 10:45:01 +0000 (10:45 +0000)]
SCEV validator: Add workarounds for some common false positives due to the way it handles strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166872
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Sat, 27 Oct 2012 09:47:33 +0000 (09:47 +0000)]
Clarify that there is an option other than OAuth for Phabricator and
offer up my email to the spam lords for it. Hopefully this will
eventually be more automatic, but we don't want people to think there is
only one option.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166870
91177308-0d34-0410-b5e6-
96231b3b80d8
Hal Finkel [Sat, 27 Oct 2012 04:33:48 +0000 (04:33 +0000)]
Update BBVectorize to use the new VTTI instr. cost interfaces.
The monolithic interface for instruction costs has been split into
several functions. This is the corresponding change. No functionality
change is intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166865
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Sat, 27 Oct 2012 04:11:32 +0000 (04:11 +0000)]
1. Fix a bug in getTypeConversion. When a *simple* type is split, we need to return the type of the split result.
2. Change the maximum vectorization width from 4 to 8.
3. A test for both.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166864
91177308-0d34-0410-b5e6-
96231b3b80d8
Quentin Colombet [Sat, 27 Oct 2012 01:10:17 +0000 (01:10 +0000)]
[code size][ARM] Emit regular call instructions instead of the move, branch sequence
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166854
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Sat, 27 Oct 2012 00:57:14 +0000 (00:57 +0000)]
Implement MipsHi for mips16
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166852
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 27 Oct 2012 00:56:56 +0000 (00:56 +0000)]
[mips] Do not tail-call optimize vararg functions or functions with byval
arguments.
This is rather conservative and should be fixed later to be more aggressive.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166851
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 27 Oct 2012 00:44:39 +0000 (00:44 +0000)]
[mips] Make sure FuncArg doesn't advance when OrigArgIndex is the same as in the
previous iteration.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166850
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 27 Oct 2012 00:29:43 +0000 (00:29 +0000)]
Use the methods and classes that were added to simplify LowerCall and
LowerFormalArguments in MipsTargetLowering.
No functionality change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166846
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 27 Oct 2012 00:21:13 +0000 (00:21 +0000)]
Add method MipsTargetLowering::writeVarArgRegs which copies argument registers
of vararg functions back to the stack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166844
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 27 Oct 2012 00:16:36 +0000 (00:16 +0000)]
Add method MipsTargetLowering::passByValArg.
This method emits nodes for passing byval arguments in registers and stack.
This has the same functionality as existing functions PassByValArg64 and
WriteByValArg which will be deleted later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166843
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Sat, 27 Oct 2012 00:10:18 +0000 (00:10 +0000)]
Add method MipsTargetLowering::copyByValRegs.
This method copies byval arguments passed in registers onto the stack and has
the same functionality as existing functions CopyMips64ByValRegs and
ReadByValArg which will be deleted later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166841
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 26 Oct 2012 23:56:38 +0000 (23:56 +0000)]
Add class MipsCC which provides methods used to analyze formal and call
arguments and inquire about calling convention information.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166840
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Fri, 26 Oct 2012 23:49:51 +0000 (23:49 +0000)]
Delete MipsFunctionInfo::InArgFIRange.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@166837
91177308-0d34-0410-b5e6-
96231b3b80d8