OSDN Git Service
Michael J. Spencer [Thu, 21 Feb 2013 02:21:29 +0000 (02:21 +0000)]
[objdump] Add PT_PHDR.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175709
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Thu, 21 Feb 2013 02:09:31 +0000 (02:09 +0000)]
Mips specific standalone assembler addressing mode %hi and %lo.
The constructs %hi() and %lo() represent the high and low 16
bits of the address.
Because the 16 bit offset field of an LW instruction is
interpreted as signed, if bit 15 of the low part is 1 then the
low part will act as a negative and 1 needs to be added to the
high part.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175707
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 21 Feb 2013 00:38:25 +0000 (00:38 +0000)]
PPCDAGToDAGISel::PostprocessISelDAG()
This patch implements the PPCDAGToDAGISel::PostprocessISelDAG virtual
method to perform post-selection peephole optimizations on the DAG
representation.
One optimization is implemented here: folds to clean up complex
addressing expressions for thread-local storage and medium code
model. It will also be useful for large code model sequences when
those are added later. I originally thought about doing this on the
MI representation prior to register assignment, but it's difficult to
do effective global dead code elimination at that point. DCE is
trivial on the DAG representation.
A typical example of a candidate code sequence in assembly:
addis 3, 2, globalvar@toc@ha
addi 3, 3, globalvar@toc@l
lwz 5, 0(3)
When the final instruction is a load or store with an immediate offset
of zero, the offset from the add-immediate can replace the zero,
provided the relocation information is carried along:
addis 3, 2, globalvar@toc@ha
lwz 5, globalvar@toc@l(3)
Since the addi can in general have multiple uses, we need to only
delete the instruction when the last use is removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175697
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Thu, 21 Feb 2013 00:27:28 +0000 (00:27 +0000)]
Provide a "None" value for convenience when using Optional<T>()
This implementation of NoneType/None does have some holes but I haven't
found one that doesn't - open to improvement.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175696
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Thu, 21 Feb 2013 00:05:29 +0000 (00:05 +0000)]
Relocation enablement for PPC DAG postprocessing pass
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175693
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 20 Feb 2013 23:57:30 +0000 (23:57 +0000)]
Formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175692
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Feb 2013 23:51:10 +0000 (23:51 +0000)]
Don't allocate memory in LiveInterval::join().
Rewrite value numbers directly in the 'Other' LiveInterval which is
moribund anyway. This avoids allocating the OtherAssignments vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175690
91177308-0d34-0410-b5e6-
96231b3b80d8
Lang Hames [Wed, 20 Feb 2013 23:36:57 +0000 (23:36 +0000)]
Kill of TransferDeadFlag - Dead copies and subreg-to-reg instructions should
just be turned into kills on the spot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175688
91177308-0d34-0410-b5e6-
96231b3b80d8
Pedro Artigas [Wed, 20 Feb 2013 23:30:56 +0000 (23:30 +0000)]
as the allocator is reset zero out the number of bytes allocated, this was just
missed before but probably what was intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175687
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Wed, 20 Feb 2013 23:11:17 +0000 (23:11 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.
Mips specific standalone assembler directive "set at".
This directive changes the general purpose register
that the assembler will use when given the symbolic
register name $at.
This does not include negative testing. That will come
in a future patch.
A side affect of this patch recognizes the different
GPR register names for temporaries between old abi
and new abi so a test case for that is included.
Contributer: Vladimir Medic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175686
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Feb 2013 23:08:26 +0000 (23:08 +0000)]
Copy single reaching defs directly into the LiveInterval.
When findReachingDefs() finds that only one value can reach the basic
block, just copy the work list of visited blocks directly into the live
interval.
Sort the block list and use a LiveRangeUpdater to make the bulk add
fast.
When multiple reaching defs are found, transfer the work list to the
updateSSA() work list as before. Also use LiveRangeUpdater in
updateLiveIns() following updateSSA().
This makes live interval analysis more than 3x faster on one huge test
case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175685
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Feb 2013 23:04:11 +0000 (23:04 +0000)]
Add and remove the attribute from the correct slot.
The slot that we're adding/removing the attribute from may not be the same as
the attribute coming in. Make sure that they match up before we try to
add/remove them.
PR15313
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175684
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 20 Feb 2013 22:43:03 +0000 (22:43 +0000)]
Stabilize vec_constants.ll
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175683
91177308-0d34-0410-b5e6-
96231b3b80d8
Erik Verbruggen [Wed, 20 Feb 2013 22:33:46 +0000 (22:33 +0000)]
Fix accidental concatenation for "outputuntil" in the -debug-buffer-size option description.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175682
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 20 Feb 2013 22:21:35 +0000 (22:21 +0000)]
MCParser: Update method names per coding guidelines.
s/AddDirectiveHandler/addDirectiveHandler/
s/ParseMSInlineAsm/parseMSInlineAsm/
s/ParseIdentifier/parseIdentifier/
s/ParseStringToEndOfStatement/parseStringToEndOfStatement/
s/ParseEscapedString/parseEscapedString/
s/EatToEndOfStatement/eatToEndOfStatement/
s/ParseExpression/parseExpression/
s/ParseParenExpression/parseParenExpression/
s/ParseAbsoluteExpression/parseAbsoluteExpression/
s/CheckForValidSection/checkForValidSection/
http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175675
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 22:10:02 +0000 (22:10 +0000)]
Only use LiveIntervals in TwoAddressInstructionPass, not a mix of Liveintervals
and SlotIndexes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175674
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 22:10:00 +0000 (22:10 +0000)]
Find anchoring end points for repairIntervalsInRange and repairIndexesInRange
automatically.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175673
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 22:09:57 +0000 (22:09 +0000)]
Make repairIntervalsInRange() more robust. There are now no longer any liveness-
related failures when running 'make check' without LiveVariables with the
verifier enabled. Some of the remaining failures elsewhere may still be fallout
from incorrect updating of LiveIntervals or the few missing cases left in the
two-address pass.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175672
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Wed, 20 Feb 2013 21:33:32 +0000 (21:33 +0000)]
DAGCombiner: Fold pointless truncate, bitcast, buildvector series
(2xi32) (truncate ((2xi64) bitcast (buildvector i32 a, i32 x, i32 b, i32 y)))
can be folded into a (2xi32) (buildvector i32 a, i32 b).
Such a DAG would cause uneccessary vdup instructions followed by vmovn
instructions.
We generate this code on ARM NEON for a setcc olt, 2xf64, 2xf64. For example, in
the vectorized version of the code below.
double A[N];
double B[N];
void test_double_compare_to_double() {
int i;
for(i=0;i<N;i++)
A[i] = (double)(A[i] < B[i]);
}
radar://
13191881
Fixes bug 15283.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175670
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 20 Feb 2013 21:31:28 +0000 (21:31 +0000)]
R600: Update for name changes from r175667.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175668
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Wed, 20 Feb 2013 21:13:59 +0000 (21:13 +0000)]
Update TargetLowering ivars for name policy.
http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly
ivars should be camel-case and start with an upper-case letter. A few in
TargetLowering were starting with a lower-case letter.
No functional change intended.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175667
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 20 Feb 2013 20:41:42 +0000 (20:41 +0000)]
Additional fixes for bug 15155.
This handles the cases where the 6-bit splat element is odd, converting
to a three-instruction sequence to add or subtract two splats. With this
fix, the XFAIL in test/CodeGen/PowerPC/vec_constants.ll is removed.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175663
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Wed, 20 Feb 2013 20:18:10 +0000 (20:18 +0000)]
[objdump] Print the PT_INTERP and PT_DYNAMIC correcctly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175659
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 20 Feb 2013 20:15:55 +0000 (20:15 +0000)]
Update a comment that looks to have been accidentally deleted many moons ago.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175658
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Feb 2013 19:28:46 +0000 (19:28 +0000)]
Rewrite comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175651
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 20 Feb 2013 19:25:09 +0000 (19:25 +0000)]
Add comment in Memory.inc explaining r175646.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175650
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Wed, 20 Feb 2013 19:15:01 +0000 (19:15 +0000)]
SIGQUIT is a "kill" signal, rather than an "int" signal, in this context.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175648
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 20 Feb 2013 18:24:34 +0000 (18:24 +0000)]
Formatting, grammar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175647
91177308-0d34-0410-b5e6-
96231b3b80d8
Krzysztof Parzyszek [Wed, 20 Feb 2013 18:24:30 +0000 (18:24 +0000)]
On PowerPC, the cache-flush instructions dcbf and icbi are treated as
loads. On FreeBSD, add PROT_READ page protection flag before flushing
cache.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175646
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Feb 2013 18:18:15 +0000 (18:18 +0000)]
Use LiveRangeUpdater instead of mergeIntervalRanges.
Performance is the same, but LiveRangeUpdater has a more flexible
interface.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175645
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Feb 2013 18:18:12 +0000 (18:18 +0000)]
Add a LiveRangeUpdater class.
Adding new segments to large LiveIntervals can be expensive because the
LiveRange objects after the insertion point may need to be moved left or
right. This can cause quadratic behavior when adding a large number of
segments to a live range.
The LiveRangeUpdater class allows the LIveInterval to be in a temporary
invalid state while segments are being added. It maintains an internal
gap in the LiveInterval when it is shrinking, and it has a spill area
for new segments when the LiveInterval is growing.
The behavior is similar to the existing mergeIntervalRanges() function,
except it allocates less memory for the spill area, and the algorithm is
turned inside out so the loop is driven by the clients.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175644
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Wed, 20 Feb 2013 18:09:21 +0000 (18:09 +0000)]
Adding support for absolute relocations. This occurs in ELF files when a relocation is given with no name and an undefined section. The relocation is applied with an address of zero.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175643
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael Liao [Wed, 20 Feb 2013 18:04:21 +0000 (18:04 +0000)]
Fix PR15267
- When extloading from a vector with non-byte-addressable element, e.g.
<4 x i1>, the current logic breaks. Extend the current logic to
fix the case where the element type is not byte-addressable by loading
all bytes, bit-extracting/packing each element.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175642
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Wed, 20 Feb 2013 18:03:44 +0000 (18:03 +0000)]
[ms-inline asm] Make the comment a bit more verbose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175641
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Wed, 20 Feb 2013 17:46:51 +0000 (17:46 +0000)]
Add a default constructor for LiveRange.
It is useful to be able to create temporary LiveRange object whose
members are filled in later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175639
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 20 Feb 2013 17:31:41 +0000 (17:31 +0000)]
Fix bug 14779 for passing anonymous aggregates [patch by Kai Nacke].
The PPC backend doesn't handle these correctly. This patch uses logic
similar to that in the X86 and ARM backends to track these arguments
properly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175635
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Wed, 20 Feb 2013 16:13:27 +0000 (16:13 +0000)]
Hexagon: Move HexagonMCInst.h to MCTargetDesc/HexagonMCInst.h.
Add HexagonMCInst class which adds various Hexagon VLIW annotations.
In addition, this class also includes some APIs related to the
constant extenders.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175634
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 20 Feb 2013 15:52:44 +0000 (15:52 +0000)]
Revert r175626, "ADT/Optional.h: Appease msvc."
Sorry, I didn't cover +Asserts, by accident. :(
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175633
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Schmidt [Wed, 20 Feb 2013 15:50:31 +0000 (15:50 +0000)]
Fix PR15155: lost vadd/vsplat optimization.
During lowering of a BUILD_VECTOR, we look for opportunities to use a
vector splat. When the splatted value fits in 5 signed bits, a single
splat does the job. When it doesn't fit in 5 bits but does fit in 6,
and is an even value, we can splat on half the value and add the result
to itself.
This last optimization hasn't been working recently because of improved
constant folding. To circumvent this, create a pseudo VADD_SPLAT that
can be expanded during instruction selection.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175632
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 20 Feb 2013 15:12:32 +0000 (15:12 +0000)]
Whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175627
91177308-0d34-0410-b5e6-
96231b3b80d8
NAKAMURA Takumi [Wed, 20 Feb 2013 15:12:24 +0000 (15:12 +0000)]
ADT/Optional.h: Appease msvc.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175626
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Wed, 20 Feb 2013 13:00:06 +0000 (13:00 +0000)]
Move the SplatByte helper to APInt and generalize it a bit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175621
91177308-0d34-0410-b5e6-
96231b3b80d8
Elena Demikhovsky [Wed, 20 Feb 2013 12:42:54 +0000 (12:42 +0000)]
I optimized the following patterns:
sext <4 x i1> to <4 x i64>
sext <4 x i8> to <4 x i64>
sext <4 x i16> to <4 x i64>
I'm running Combine on SIGN_EXTEND_IN_REG and revert SEXT patterns:
(sext_in_reg (v4i64 anyext (v4i32 x )), ExtraVT) -> (v4i64 sext (v4i32 sext_in_reg (v4i32 x , ExtraVT)))
The sext_in_reg (v4i32 x) may be lowered to shl+sar operations.
The "sar" does not exist on 64-bit operation, so lowering sext_in_reg (v4i64 x) has no vector solution.
I also added a cost of this operations to the AVX costs table.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175619
91177308-0d34-0410-b5e6-
96231b3b80d8
Kostya Serebryany [Wed, 20 Feb 2013 12:35:15 +0000 (12:35 +0000)]
[asan] instrument invoke insns with noreturn attribute (as well as call insns)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175617
91177308-0d34-0410-b5e6-
96231b3b80d8
Logan Chien [Wed, 20 Feb 2013 12:21:33 +0000 (12:21 +0000)]
Fix thumbv5e frame lowering assertion failure.
It is possible that frame pointer is not found in the
callee saved info, thus FramePtrSpillFI may be incorrect
if we don't check the result of hasFP(MF).
Besides, if we enable the stack coloring algorithm, there
will be an assertion to ensure the slot is live. But in
the test case, %var1 is not live in the prologue of the
function, and we will get the assertion failure.
Note: There is similar code in ARMFrameLowering.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175616
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Feb 2013 07:48:23 +0000 (07:48 +0000)]
Use the attribute group reference instead of the attribute directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175609
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 Feb 2013 07:39:20 +0000 (07:39 +0000)]
Fully qualify llvm::next to avoid ambiguity when building as C++11.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175608
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 Feb 2013 07:39:18 +0000 (07:39 +0000)]
Fix the (clang -Werror) build by removing an unused member variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175607
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Feb 2013 07:21:42 +0000 (07:21 +0000)]
Modify the LLVM assembly output so that it uses references to represent function attributes.
This makes the LLVM assembly look better. E.g.:
define void @foo() #0 { ret void }
attributes #0 = { nounwind noinline ssp }
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175605
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 06:46:48 +0000 (06:46 +0000)]
Add support to the two-address pass for updating LiveIntervals in many of the
common transformations. This includes updating repairIntervalsInRange() to
handle more cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175604
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 06:46:46 +0000 (06:46 +0000)]
Move the computation of the IsEarlyClobber flag into its own loop, since the
correct value is needed in every iteration of the loop for updating
LiveIntervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175603
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 06:46:44 +0000 (06:46 +0000)]
Modify LiveInterval::addRange() to match the comment about what it returns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175602
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 06:46:41 +0000 (06:46 +0000)]
Add SlotIndexes::repairIndexesInRange(), which repairs SlotIndexes after adding
and removing instructions. The implementation seems more complicated than it
needs to be, but I couldn't find something simpler that dealt with all of the
corner cases.
Also add a call to repairIndexesInRange() from repairIntervalsInRange().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175601
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 06:46:39 +0000 (06:46 +0000)]
Make SlotIndex::getEntry() return unsigned to match IndexListEntry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175600
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 06:46:36 +0000 (06:46 +0000)]
Fix a misunderstanding about how RegMaskBlocks works. This was caught by
assertions in the register allocator when running 'make check' without
LiveVariables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175599
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 06:46:34 +0000 (06:46 +0000)]
Remove verification after PHIElimination when using LiveIntervals, and move it
after the two-address pass. The remaining problems in 'make check' are occurring
later.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175598
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 06:46:32 +0000 (06:46 +0000)]
Avoid recomputing an inserted instruction's SlotIndex.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175597
91177308-0d34-0410-b5e6-
96231b3b80d8
Cameron Zwarich [Wed, 20 Feb 2013 06:46:28 +0000 (06:46 +0000)]
Add preservation of SlotIndexes to PHIElimination.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175596
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 Feb 2013 06:25:36 +0000 (06:25 +0000)]
Rename llvm::Optional<T>::Reset to 'reset' as per LLVM naming conventions.
Code review feedback on r175580 from Jordan Rose.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175595
91177308-0d34-0410-b5e6-
96231b3b80d8
Reed Kotler [Wed, 20 Feb 2013 05:45:15 +0000 (05:45 +0000)]
Expand pseudos/macros:
SltCCRxRy16, SltiCCRxImmX16, SltiuCCRxImmX16, SltuCCRxRy16
$T8 shows up as register $24 when emitted from C++ code so we had
to change some tests that were already there for this functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175593
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Wed, 20 Feb 2013 02:37:12 +0000 (02:37 +0000)]
[llvm-readobj] Add ELF .dynamic table dumping.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175592
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 20 Feb 2013 00:32:19 +0000 (00:32 +0000)]
Remove unneeded #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175584
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 20 Feb 2013 00:31:54 +0000 (00:31 +0000)]
Add missing #include.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175583
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 20 Feb 2013 00:26:25 +0000 (00:26 +0000)]
Fix #includes, so we include only what we really need.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175581
91177308-0d34-0410-b5e6-
96231b3b80d8
David Blaikie [Wed, 20 Feb 2013 00:26:04 +0000 (00:26 +0000)]
Allow llvm::Optional to work with types without default constructors.
This generalizes Optional to require less from the T type by using aligned
storage for backing & placement new/deleting the T into it when necessary.
Also includes unit tests.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175580
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Wed, 20 Feb 2013 00:17:42 +0000 (00:17 +0000)]
Move part of APInt implementation from header to cpp file. These methods
require call cpp file anyway, so we wouldn't gain anything by keeping them
inline.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175579
91177308-0d34-0410-b5e6-
96231b3b80d8
Pedro Artigas [Wed, 20 Feb 2013 00:10:29 +0000 (00:10 +0000)]
clear new map and initialize new variable
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175578
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Wed, 20 Feb 2013 00:04:41 +0000 (00:04 +0000)]
Add the function attributes from an inline asm call. These don't have declarations that set the attribute groups, so we must do it on our own.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175577
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 19 Feb 2013 23:50:45 +0000 (23:50 +0000)]
[ms-inline asm] Force the use of a base pointer if the MachineFunction includes
MS-style inline assembly.
This is a follow-on to r175334. Forcing a FP to be emitted doesn't ensure it
will be used. Therefore, force the base pointer as well. We now treat MS
inline assembly in the same way we treat functions with dynamic stack
realignment and VLAs. This guarantees the BP will be used to reference
parameters and locals.
rdar://
13218191
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175576
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Feb 2013 22:38:58 +0000 (22:38 +0000)]
Update a portability kludge to keep it in sync with changes in the code
which uses it. This is not ideal, but it ought to at least restore the
behavior to what it was before.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175571
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 19 Feb 2013 22:29:00 +0000 (22:29 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.
Mips (o32 abi) specific e_header setting.
EF_MIPS_ABI_O32 needs to be set in the
ELF header flags for o32 abi output.
Contributer: Reed Kotler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175569
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 19 Feb 2013 22:17:58 +0000 (22:17 +0000)]
Remove unused variable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175568
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 19 Feb 2013 22:14:45 +0000 (22:14 +0000)]
Minor cleanups. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175567
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 19 Feb 2013 22:14:34 +0000 (22:14 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.
Mips (Mips16) specific e_header setting.
EF_MIPS_ARCH_ASE_M16 needs to be set in the
ELF header flags for Mips16.
Contributer: Reed Kotler
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175566
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 19 Feb 2013 22:06:38 +0000 (22:06 +0000)]
Remove unneeded #includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175565
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 19 Feb 2013 22:04:37 +0000 (22:04 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.
Mips (MicroMips) specific STO handling .
The st_other field settig for STO_MIPS_MICROMIPS
Contributer: Zoran Jovanovic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175564
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 19 Feb 2013 22:02:21 +0000 (22:02 +0000)]
Fix typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175562
91177308-0d34-0410-b5e6-
96231b3b80d8
Jack Carter [Tue, 19 Feb 2013 21:57:35 +0000 (21:57 +0000)]
ELF symbol table field st_other support,
excluding visibility bits.
Generic STO handling at the Target level.
The st_other field of the ELF symbol table is one
byte in size. The first 2 bytes are used for generic
visibility and are currently handled by llvm.
The other six bits are processor specific and need
to be set at the target level.
A couple of notes:
The new static methods for accessing and setting the "other"
flags in include/llvm/MC/MCELF.h match the style guide
and not the other methods in the file. I don't like the
inconsistency, but feel I should follow the prescribed
lowerUpper() convention.
STO_ value definitions are not specified in gnu land as
consistently as the STT_ and STB_ fields. Probably because
the latter were defined in a standards doc and the former
defined partially in code. I have stuck with the full byte
definition of the flags.
Contributer: Zoran Jovanovic
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175561
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 19 Feb 2013 21:54:59 +0000 (21:54 +0000)]
Add obvious constantness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175560
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakub Staszak [Tue, 19 Feb 2013 21:49:54 +0000 (21:49 +0000)]
Simplify code. No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175559
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 19 Feb 2013 20:16:45 +0000 (20:16 +0000)]
ARM NEON: Don't need COPY_TO_REGCLASS in pattern
In my previous commit:
"Merge a f32 bitcast of a v2i32 extractelt
A vectorized sitfp on doubles will get scalarized to a sequence of an
extract_element of <2 x i32>, a bitcast to f32 and a sitofp.
Due to the the extract_element, and the bitcast we will uneccessarily generate
moves between scalar and vector registers."
I added a pattern containing a copy_to_regclass. The copy_to_regclass is
actually not needed.
radar://
13191881
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175555
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 19 Feb 2013 20:02:09 +0000 (20:02 +0000)]
Fix a bug in mayHaveSideEffects. Functions that do not return are now considered as instructions with side effects.
rdar://
13227456
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175553
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Tue, 19 Feb 2013 19:36:59 +0000 (19:36 +0000)]
Fix a bug that was found by the clang static analyzer. The var "AT" is null so we cant deref it.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175550
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Feb 2013 19:36:55 +0000 (19:36 +0000)]
Whitelist files and block devices instead of blacklisting fifos and
character devices.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175549
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Tue, 19 Feb 2013 18:57:53 +0000 (18:57 +0000)]
Don't trust st_size of a character device. This fixes using
/dev/stdin as an input when stdin is connected to a tty, for example.
No test, because it's difficult to write a reasonably portable test
for this. /dev/stdin isn't a character device when stdin is redirected
from a file or connected to a pipe.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175542
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Tue, 19 Feb 2013 18:55:36 +0000 (18:55 +0000)]
ARM: Allocation hints must make sure to be in the alloc order.
When creating an allocation hint for a register pair, make sure the hint
for the physical register reference is still in the allocation order.
rdar://
13240556
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175541
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 19 Feb 2013 18:41:01 +0000 (18:41 +0000)]
Assert that the target provided hints are in the allocation order.
Target implementations of getRegAllocationHints() should use the
provided allocation order, and they can never return hints outside the
order. This is already documented in TargetRegisterInfo.h.
<rdar://problem/
13240556>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175540
91177308-0d34-0410-b5e6-
96231b3b80d8
Douglas Gregor [Tue, 19 Feb 2013 18:26:07 +0000 (18:26 +0000)]
Remove my bogus MapVector::erase() with a narrower ::pop_back(), and add a unit test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175538
91177308-0d34-0410-b5e6-
96231b3b80d8
Jyotsna Verma [Tue, 19 Feb 2013 18:18:36 +0000 (18:18 +0000)]
Hexagon: Sync TSFlags in MCTargetDesc/HexagonBaseInfo.h with
HexagonInstrFormats.td.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175537
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 19 Feb 2013 17:32:57 +0000 (17:32 +0000)]
Clean up HiPE prologue emission a bit and avoid signed arithmetic tricks.
No intended functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175536
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Tue, 19 Feb 2013 17:14:33 +0000 (17:14 +0000)]
Move LLVM_LIBRARY_VISIBILITY for consistency with what was done to
PPCJITInfo.cpp in r175394.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175531
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 19 Feb 2013 17:11:48 +0000 (17:11 +0000)]
Fix typo
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175530
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Tue, 19 Feb 2013 16:51:44 +0000 (16:51 +0000)]
Fix GCMetadaPrinter::finishAssembly not executed, patch by Yiannis Tsiouris.
Due to the execution order of doFinalization functions, the GC information were
deleted before AsmPrinter::doFinalization was executed. Thus, the
GCMetadataPrinter::finishAssembly was never called.
The patch fixes that by moving the code of the GCInfoDeleter::doFinalization to
Printer::doFinalization.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175528
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 19 Feb 2013 16:47:59 +0000 (16:47 +0000)]
Make ARMAsmPrinter pass name more precise and fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175527
91177308-0d34-0410-b5e6-
96231b3b80d8
Eli Bendersky [Tue, 19 Feb 2013 16:38:32 +0000 (16:38 +0000)]
Make pass name more precise and fix comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175525
91177308-0d34-0410-b5e6-
96231b3b80d8
Arnold Schwaighofer [Tue, 19 Feb 2013 15:27:05 +0000 (15:27 +0000)]
ARM NEON: Merge a f32 bitcast of a v2i32 extractelt
A vectorized sitfp on doubles will get scalarized to a sequence of an
extract_element of <2 x i32>, a bitcast to f32 and a sitofp.
Due to the the extract_element, and the bitcast we will uneccessarily generate
moves between scalar and vector registers.
The patch fixes this by using a COPY_TO_REGCLASS and a EXTRACT_SUBREG to extract
the element from the vector instead.
radar://
13191881
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175520
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 19 Feb 2013 15:22:47 +0000 (15:22 +0000)]
R600: Add AR_X to the R600_TReg_X register class.
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175519
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 19 Feb 2013 15:22:45 +0000 (15:22 +0000)]
R600: Mark all members of the TRegMem register class as reserved
This stops the Machine Verifier from complaining about uses of undefined
physical registers.
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175518
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 19 Feb 2013 15:22:44 +0000 (15:22 +0000)]
R600: Fix scheduler crash caused by invalid MachinePointerInfo
Kernel function arguments are lowered to loads from the PARAM_I address
space. When creating these load instructions, we were initializing
their MachinePointerInfo with an Arguement object that was not attached
to any function. This was causing the MachineScheduler to crash when
it tried to access the parent of the Arguement.
This has been fixed by initializing the MachinePointerInfo with a
UndefValue instead.
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175517
91177308-0d34-0410-b5e6-
96231b3b80d8
Tom Stellard [Tue, 19 Feb 2013 15:22:42 +0000 (15:22 +0000)]
R600: Fix tracking of implicit defs in the IndirectAddressing pass
In some cases, we were losing track of live implicit registers which
was creating dead defs and causing the scheduler to produce invalid
code.
NOTE: This is a candidate for the Mesa stable branch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175516
91177308-0d34-0410-b5e6-
96231b3b80d8