OSDN Git Service
Akira Hatanaka [Tue, 31 Jul 2012 22:11:05 +0000 (22:11 +0000)]
Add Mips16InstrInfo.cpp and MipsSEInstrInfo.cpp to CMakeLists.txt.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161083
91177308-0d34-0410-b5e6-
96231b3b80d8
Michael J. Spencer [Tue, 31 Jul 2012 22:04:08 +0000 (22:04 +0000)]
[obj2yaml] Print the Relocations header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161082
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 31 Jul 2012 21:49:49 +0000 (21:49 +0000)]
Add definitions of two subclasses of MipsInstrInfo, MipsInstrInfo (for mips16),
and MipsSEInstrInfo (for mips32/64).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161081
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 31 Jul 2012 21:39:17 +0000 (21:39 +0000)]
Delete mips64 target machine classes. mips target machines can be used in place
of them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161080
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 31 Jul 2012 21:28:49 +0000 (21:28 +0000)]
Let PEI::calculateFrameObjectOffsets compute the final stack size rather than
computing it in MipsFrameLowering::emitPrologue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161078
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 31 Jul 2012 20:54:48 +0000 (20:54 +0000)]
Expand DYNAMIC_STACKALLOC nodes rather than doing custom-lowering.
The frame object which points to the dynamically allocated area will not be
needed after changes are made to cease reserving call frames.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161076
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 31 Jul 2012 20:45:38 +0000 (20:45 +0000)]
MachineSink: Sort the successors before trying to find SuccToSinkTo.
Use stable_sort instead of sort. Follow-up to r161062.
rdar://
11980766
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161075
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 Jul 2012 20:44:38 +0000 (20:44 +0000)]
Compute instruction depths through the current trace.
Assuming infinite issue width, compute the earliest each instruction in
the trace can issue, when considering the latency of data dependencies.
The issue cycle is record as a 'depth' from the beginning of the trace.
This is half the computation required to find the length of the critical
path through the trace. Heights are next.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161074
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 Jul 2012 20:25:13 +0000 (20:25 +0000)]
Rename CT -> MTM. MachineTraceMetrics is abbreviated MTM.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161072
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 31 Jul 2012 19:13:07 +0000 (19:13 +0000)]
Define ADJCALLSTACKDOWN/UP nodes. These nodes are emitted regardless of whether
or not it is in mips16 mode. Define MipsPseudo (mode-independant pseudo) and
PseudoSE (mips32/64 pseudo) classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161071
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 31 Jul 2012 18:55:01 +0000 (18:55 +0000)]
Change name of class MipsInst to InstSE to distinguish it from mips16's
instruction class. SE stands for standard encoding.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161069
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 31 Jul 2012 18:46:41 +0000 (18:46 +0000)]
When store nodes or memcpy nodes are created to copy the function call
arguments to the stack in MipsISelLowering::LowerCall, use stack pointer and
integer offset operands rather than frame object operands.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161068
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Tue, 31 Jul 2012 18:29:21 +0000 (18:29 +0000)]
[x86 frame lowering] In 32-bit mode, use ESI as the base pointer.
Previously, we were using EBX, but PIC requires the GOT to be in EBX before
function calls via PLT GOT pointer.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161066
91177308-0d34-0410-b5e6-
96231b3b80d8
Ted Kremenek [Tue, 31 Jul 2012 18:23:44 +0000 (18:23 +0000)]
Use regex instead of special casing clang and llvm libraries.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161065
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Tue, 31 Jul 2012 18:16:49 +0000 (18:16 +0000)]
Fix type of LUXC1 and SUXC1. These instructions were incorrectly defined as
single-precision load and store.
Also avoid selecting LUXC1 and SUXC1 instructions during isel. It is incorrect
to map unaligned floating point load/store nodes to these instructions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161063
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 31 Jul 2012 18:10:39 +0000 (18:10 +0000)]
MachineSink: Sort the successors before trying to find SuccToSinkTo.
One motivating example is to sink an instruction from a basic block which has
two successors: one outside the loop, the other inside the loop. We should try
to sink the instruction outside the loop.
rdar://
11980766
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161062
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Tue, 31 Jul 2012 18:07:43 +0000 (18:07 +0000)]
Conform to LLVM coding style.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161061
91177308-0d34-0410-b5e6-
96231b3b80d8
Micah Villmow [Tue, 31 Jul 2012 16:48:03 +0000 (16:48 +0000)]
Don't generate ordered or unordered comparison operations if it is not legal to do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161053
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 31 Jul 2012 09:42:24 +0000 (09:42 +0000)]
Implement copy and move assignment for TinyPtrVector. These try to
re-use allocated vectors as much as possible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161041
91177308-0d34-0410-b5e6-
96231b3b80d8
Sylvestre Ledru [Tue, 31 Jul 2012 07:05:57 +0000 (07:05 +0000)]
Fix some minor typos
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161037
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2012 06:15:39 +0000 (06:15 +0000)]
Use uint8_t to store the InstructionContext table. Saves 768 bytes of static data.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161034
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2012 06:02:05 +0000 (06:02 +0000)]
Tidy up. Move for loop index declarations into for statements. Use unsigned instead of uint16_t for loop indices. Use unsigned instead of uint32_t for arguments to raw_ostream.indent.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161033
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2012 05:42:02 +0000 (05:42 +0000)]
Tidy up function argument formatting.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161032
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2012 05:28:41 +0000 (05:28 +0000)]
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161031
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2012 05:27:01 +0000 (05:27 +0000)]
Remove trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161030
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2012 05:18:26 +0000 (05:18 +0000)]
Make INSTRUCTION_SPECIFIER_FIELDS match X86DisassemblerCommon.h. Also remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161029
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2012 04:58:05 +0000 (04:58 +0000)]
Tidy up trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161027
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Tue, 31 Jul 2012 04:38:27 +0000 (04:38 +0000)]
Tidy up trailing whitespace
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161026
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 31 Jul 2012 04:13:57 +0000 (04:13 +0000)]
Clean up trailing whitespace and unnecessary blank lines.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161025
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Tue, 31 Jul 2012 02:48:31 +0000 (02:48 +0000)]
Bring TinyPtrVector under test. Somehow we never picked up unit tests
for this class. These tests exercise most of the basic properties, but
the API for TinyPtrVector is very strange currently. My plan is to start
fleshing out the API to match that of SmallVector, but I wanted a test
for what is there first.
Sadly, it doesn't look reasonable to just re-use the SmallVector tests,
as this container can only ever store pointers, and much of the
SmallVector testing is to get construction and destruction right.
Just to get this basic test working, I had to add value_type to the
interface.
While here I found a subtle bug in the combination of 'erase', 'begin',
and 'end'. Both 'begin' and 'end' wanted to use a null pointer to
indicate the "end" iterator of an empty vector, regardless of whether
there is actually a vector allocated or the pointer union is null.
Everything else was fine with this except for erase. If you erase the
last element of a vector after it has held more than one element, we
return the end iterator of the underlying SmallVector which need not be
a null pointer. Instead, simply use the pointer, and poniter + size()
begin/end definitions in the tiny case, and delegate to the inner vector
whenever it is present.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161024
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Tue, 31 Jul 2012 02:47:24 +0000 (02:47 +0000)]
Clear kill flags in removeCopyByCommutingDef().
We are extending live ranges, so kill flags are not accurate. They
aren't needed until they are recomputed after RA anyway.
<rdar://problem/
11950722>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161023
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Tue, 31 Jul 2012 01:11:07 +0000 (01:11 +0000)]
Reverse order of the two branches at end of a basic block if it is profitable.
We branch to the successor with higher edge weight first.
Convert from
je LBB4_8 --> to outer loop
jmp LBB4_14 --> to inner loop
to
jne LBB4_14
jmp LBB4_8
PR12750
rdar:
11393714
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161018
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 30 Jul 2012 23:48:17 +0000 (23:48 +0000)]
Use the latest MachineRegisterInfo APIs. No functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161010
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 30 Jul 2012 23:48:14 +0000 (23:48 +0000)]
Added MachineRegisterInfo::hasOneDef()
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161009
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Mon, 30 Jul 2012 23:48:12 +0000 (23:48 +0000)]
Inline MachineRegisterInfo::hasOneUse
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161007
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 30 Jul 2012 23:45:06 +0000 (23:45 +0000)]
Extend the InstVisitor to visit the specialized classes wrapping
CallInst for intrinsics. This allows users of the InstVisitor that would
like to special case certain very common intrinsics to do so naturally
in keeping with the type hierarchy's utility classes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161006
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Jul 2012 23:15:12 +0000 (23:15 +0000)]
Avoid looking at stale data in verifyAnalysis().
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161004
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Jul 2012 23:15:10 +0000 (23:15 +0000)]
Allow traces to enter nested loops.
This lets traces include the final iteration of a nested loop above the
center block, and the first iteration of a nested loop below the center
block.
We still don't allow traces to contain backedges, and traces are
truncated where they would leave a loop, as seen from the center block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161003
91177308-0d34-0410-b5e6-
96231b3b80d8
Jim Grosbach [Mon, 30 Jul 2012 22:44:17 +0000 (22:44 +0000)]
Keep empty assembly macro argument values in the middle of the list.
Empty macro arguments at the end of the list should be as-if not specified at
all, but those in the middle of the list need to be kept so as not to screw
up the positional numbering. E.g.:
.macro foo
foo_-bash___:
nop
.endm
foo 1, 2, 3, 4
foo 1, , 3, 4
Should create two labels, "foo_1_2_3_4" and "foo_1__3_4".
rdar://
11948769
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161002
91177308-0d34-0410-b5e6-
96231b3b80d8
Chandler Carruth [Mon, 30 Jul 2012 22:17:52 +0000 (22:17 +0000)]
Move the SmallVector unit tests to be type-parameterized so that we can
test more than a single instantiation of SmallVector.
Add testing for 0, 1, 2, and 4 element sized "small" buffers. These
appear to be essentially untested in the unit tests until now.
Fix several tests to be robust in the face of a '0' small buffer. As
a consequence of this size buffer, the growth patterns are actually
observable in the test -- yes this means that many tests never caused
a grow to occur before. For some tests I've merely added a reserve call
to normalize behavior. For others, the growth is actually interesting,
and so I captured the fact that growth would occur and adjusted the
assertions to not assume how rapidly growth occured.
Also update the specialization for a '0' small buffer length to have all
the same interface points as the normal small vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161001
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Jul 2012 21:16:22 +0000 (21:16 +0000)]
Clarify invalidation strategy in comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160997
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Mon, 30 Jul 2012 21:10:51 +0000 (21:10 +0000)]
Fix grammar-o. Fixes PR13482!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160996
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Jul 2012 21:10:27 +0000 (21:10 +0000)]
Assert that all trace candidate blocks have been visited by the PO.
When computing a trace, all the candidates for pred/succ must have been
visited. Filter out back-edges first, though. The PO traversal ignores
them.
Thanks to Andy for spotting this in review.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160995
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Jul 2012 20:57:50 +0000 (20:57 +0000)]
Hook into PassManager's analysis verification.
By overriding Pass::verifyAnalysis(), the pass contents will be verified
by the pass manager.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160994
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Mon, 30 Jul 2012 20:23:19 +0000 (20:23 +0000)]
Consider address spaces for hashing and CSEing DAG nodes. Otherwise two loads from different x86 segments but the same address would get CSEd
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160987
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Mon, 30 Jul 2012 20:09:37 +0000 (20:09 +0000)]
Typo.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160981
91177308-0d34-0410-b5e6-
96231b3b80d8
Kevin Enderby [Mon, 30 Jul 2012 18:46:15 +0000 (18:46 +0000)]
Fix a bug in ARMMachObjectWriter::RecordRelocation() in ARMMachObjectWriter.cpp
where the other_half of the movt and movw relocation entries needs to get set
and only with the 16 bits of the other half.
rdar://
10038370
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160978
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Jul 2012 18:34:14 +0000 (18:34 +0000)]
Add MachineInstr::isTransient().
This is a cleaned up version of the isFree() function in
MachineTraceMetrics.cpp.
Transient instructions are very unlikely to produce any code in the
final output. Either because they get eliminated by RegisterCoalescing,
or because they are pseudo-instructions like labels and debug values.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160977
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Jul 2012 18:34:11 +0000 (18:34 +0000)]
Add MachineTraceMetrics::verify().
This function verifies the consistency of cached data in the
MachineTraceMetrics analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160976
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Jul 2012 17:36:49 +0000 (17:36 +0000)]
Verify that the CFG hasn't changed during invalidate().
The MachineTraceMetrics analysis must be invalidated before modifying
the CFG. This will catch some of the violations of that rule.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160969
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Mon, 30 Jul 2012 17:36:47 +0000 (17:36 +0000)]
Add MachineBasicBlock::isPredecessor().
A->isPredecessor(B) is the same as B->isSuccessor(A), but it can
tolerate a B that is null or dangling. This shouldn't happen normally,
but it it useful for verification code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160968
91177308-0d34-0410-b5e6-
96231b3b80d8
Nadav Rotem [Mon, 30 Jul 2012 07:25:20 +0000 (07:25 +0000)]
When constant folding GEP expressions, keep the address space information of pointers.
Together with Ran Chachick <ran.chachick@intel.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160954
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 07:14:07 +0000 (07:14 +0000)]
Mark MOVZX16/MOVSX16 as neverHasSideEffects/mayLoad
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160953
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 06:48:11 +0000 (06:48 +0000)]
Mark MOVZX32_NOREX as isCodeGenOnly and neverHasSideEffects. The isCodeGenOnly change allows special detection of _NOREX instructions to be removed from tablegen disassembler code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160951
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 06:27:19 +0000 (06:27 +0000)]
Remove some unnecessary filter checks. They were already covered by IsCodeGenOnly
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160950
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 05:39:34 +0000 (05:39 +0000)]
Remove check for sub class of X86Inst from filter function since caller guaranteed it. Replace another sub class check with ShouldBeEmitted flag since it was factored in there already.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160949
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 05:10:05 +0000 (05:10 +0000)]
Simplify code that filtered certain instructions in two different ways. No functional change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160948
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 04:53:00 +0000 (04:53 +0000)]
Remove check for f256mem from has256BitOperands as nothing depended on it and it isn't the only 256-bit memory type anyway.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160946
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 04:48:12 +0000 (04:48 +0000)]
Remove trailing whitespace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160945
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 02:20:32 +0000 (02:20 +0000)]
Give VCVTTPD2DQ priority over CVTTPD2DQ.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160942
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 02:14:02 +0000 (02:14 +0000)]
Fix patterns for CVTTPS2DQ to specify SSE2 instead of SSE1.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160941
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Mon, 30 Jul 2012 01:38:57 +0000 (01:38 +0000)]
Fix up patterns for VCVTSS2SD. Specifically give it priority over SSE form. Add an OptForSpeed to explicitly pair up with an OptForSize that was already on another pattern.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160939
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 29 Jul 2012 23:26:34 +0000 (23:26 +0000)]
Fix load types on intrinsic forms of SS2SD and SD2SS AVX/SSE convert instruction patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160938
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sun, 29 Jul 2012 22:30:06 +0000 (22:30 +0000)]
Move more SSE/AVX convert instruction patterns into their definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160937
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Sun, 29 Jul 2012 12:33:29 +0000 (12:33 +0000)]
APInt: Simplify code.
No functionality change.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160929
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sun, 29 Jul 2012 02:44:09 +0000 (02:44 +0000)]
Revert r160920 and r160919 due to dragonegg and clang selfhost failure
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160927
91177308-0d34-0410-b5e6-
96231b3b80d8
Nick Lewycky [Sun, 29 Jul 2012 01:15:37 +0000 (01:15 +0000)]
Add testcases for GlobalOpt changes in r160693 and r160757.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160925
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 28 Jul 2012 18:59:19 +0000 (18:59 +0000)]
Fold patterns for some of the SSE/AVX convert instructions into their instruction definitions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160922
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 28 Jul 2012 18:36:39 +0000 (18:36 +0000)]
Mark some of the SSE/AVX convert instructions as mayLoad/neverHasSideEffects.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160921
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 28 Jul 2012 17:51:24 +0000 (17:51 +0000)]
X86 Peephole: fold loads to the source register operand if possible.
Trying to fix the bot by specifying a triple in the failing testing cases.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160920
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 28 Jul 2012 16:48:01 +0000 (16:48 +0000)]
X86 Peephole: fold loads to the source register operand if possible.
Machine CSE and other optimizations can remove instructions so folding
is possible at peephole while not possible at ISel.
rdar://
10554090 and rdar://
11873276
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160919
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 28 Jul 2012 08:28:23 +0000 (08:28 +0000)]
Make CVTSS2SI instruction definition consistent with CVTSD2SI.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160914
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Sat, 28 Jul 2012 07:59:59 +0000 (07:59 +0000)]
Fix up memory load types for SSE scalar convert intrinsic patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160913
91177308-0d34-0410-b5e6-
96231b3b80d8
Manman Ren [Sat, 28 Jul 2012 03:15:46 +0000 (03:15 +0000)]
X86 Peephole: fix PR13475 in optimizeCompare.
It is possible that an instruction can use and update EFLAGS.
When checking the safety, we should check the usage of EFLAGS first before
declaring it is safe to optimize due to the update.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160912
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Trick [Sat, 28 Jul 2012 01:48:15 +0000 (01:48 +0000)]
Reenable a basic SSA DAG builder optimization.
Jakob fixed ProcessImplicifDefs in r159149.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160910
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 Jul 2012 23:58:38 +0000 (23:58 +0000)]
Add more debug output to MachineTraceMetrics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160905
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 Jul 2012 23:58:36 +0000 (23:58 +0000)]
Keep track of the head and tail of the trace through each block.
This makes it possible to quickly detect blocks that are outside the
trace.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160904
91177308-0d34-0410-b5e6-
96231b3b80d8
Eric Christopher [Fri, 27 Jul 2012 22:00:05 +0000 (22:00 +0000)]
Add a DW_AT_high_pc for CUs that are a single address range. Update
all tests accordingly.
Fixes PR13351.
Patch by shinichiro hamaji!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160899
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 Jul 2012 21:56:39 +0000 (21:56 +0000)]
Also compute register mask lists under -new-live-intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160898
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 27 Jul 2012 21:41:59 +0000 (21:41 +0000)]
Typos.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160897
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Fri, 27 Jul 2012 21:21:26 +0000 (21:21 +0000)]
Teach CodeGenPrep to look past bitcast when it's duplicating return instruction
into predecessor blocks to enable tail call optimization.
rdar://
11958338
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160894
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 Jul 2012 21:11:14 +0000 (21:11 +0000)]
Eliminate the IS_PHI_DEF flag and VNInfo::setIsPHIDef().
A value number is a PHI def if and only if it begins at a block
boundary. This can be derived from the def slot, a separate flag is not
necessary.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160893
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 Jul 2012 20:58:46 +0000 (20:58 +0000)]
Add a -new-live-intervals experimental option.
This option replaces the existing live interval computation with one
based on LiveRangeCalc.cpp. The new algorithm does not depend on
LiveVariables, and it can be run at any time, before or after leaving
SSA form.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160892
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 27 Jul 2012 20:30:12 +0000 (20:30 +0000)]
Fixing problems with X86_64_32 relocations and making the assertions more readable.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160889
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 Jul 2012 20:19:49 +0000 (20:19 +0000)]
Add <imp-def> of super-register when lowering SUBREG_TO_REG.
Patch by Tyler Nowicki!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160888
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 27 Jul 2012 19:05:58 +0000 (19:05 +0000)]
SmallVector: Crank up verbosity of asserts per Chandler's request.
Also add assertions to validate the iterator in the insert method overloads.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160882
91177308-0d34-0410-b5e6-
96231b3b80d8
Chad Rosier [Fri, 27 Jul 2012 19:03:02 +0000 (19:03 +0000)]
The TimePassesIsEnabled has since moved to PassManager.cpp.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160881
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 27 Jul 2012 18:39:47 +0000 (18:39 +0000)]
Test commit, clean up comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160880
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 27 Jul 2012 18:21:15 +0000 (18:21 +0000)]
fix PR13390: do not loop forever with self-referencing self instructions
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160876
91177308-0d34-0410-b5e6-
96231b3b80d8
Nuno Lopes [Fri, 27 Jul 2012 18:03:57 +0000 (18:03 +0000)]
fix infinite loop in instcombine in the presence of a (malformed) self-referencing select inst.
This can happen as long as the instruction is not reachable. Instcombine does generate these unreachable malformed selects when doing RAUW
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160874
91177308-0d34-0410-b5e6-
96231b3b80d8
Andrew Kaylor [Fri, 27 Jul 2012 17:52:42 +0000 (17:52 +0000)]
Test commit, clean up comment
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160873
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 Jul 2012 16:25:20 +0000 (16:25 +0000)]
Give MCRegisterInfo an implementation file.
Move some functions from MCRegisterInfo.h that don't need to be inline.
This shrinks llc by 8K.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160865
91177308-0d34-0410-b5e6-
96231b3b80d8
Benjamin Kramer [Fri, 27 Jul 2012 09:10:25 +0000 (09:10 +0000)]
SmallVector::erase: Assert that iterators are actually inside the vector.
The rationale here is that it's hard to write loops containing vector erases and
it only shows up if the vector contains non-trivial objects leading to crashes
when forming them out of garbage memory.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160854
91177308-0d34-0410-b5e6-
96231b3b80d8
Craig Topper [Fri, 27 Jul 2012 06:44:02 +0000 (06:44 +0000)]
Clean up includes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160852
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Fri, 27 Jul 2012 00:10:51 +0000 (00:10 +0000)]
Eliminate the large XXXSubRegTable constant arrays.
These tables were indexed by [register][subreg index] which made them,
very large and sparse.
Replace them with lists of sub-register indexes that match the existing
lists of sub-registers. MCRI::getSubReg() becomes a very short linear
search, like getSubRegIndex() already was.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160843
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 26 Jul 2012 23:39:50 +0000 (23:39 +0000)]
Remove support for 'CompositeIndices' and sub-register cycles.
Now that the weird X86 sub_ss and sub_sd sub-register indexes are gone,
there is no longer a need for the CompositeIndices construct in .td
files. Sub-register index composition can be specified on the
SubRegIndex itself using the ComposedOf field.
Also enforce unique names for sub-registers in TableGen. The same
sub-register cannot be available with multiple sub-register indexes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160842
91177308-0d34-0410-b5e6-
96231b3b80d8
Akira Hatanaka [Thu, 26 Jul 2012 23:27:01 +0000 (23:27 +0000)]
Pass the correct call frame size to callseq_start node. This is needed to
replace uses of function getMaxCallFrameSize defined in MipsFunctionInfo with
the one MachineFrameInfo has.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160841
91177308-0d34-0410-b5e6-
96231b3b80d8
Pete Cooper [Thu, 26 Jul 2012 23:10:24 +0000 (23:10 +0000)]
Simplify demanded bits of select sources where the condition is a constant vector
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160835
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 26 Jul 2012 23:07:20 +0000 (23:07 +0000)]
Remove the X86 sub_ss and sub_sd sub-register indexes completely.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160833
91177308-0d34-0410-b5e6-
96231b3b80d8
Jakob Stoklund Olesen [Thu, 26 Jul 2012 23:03:08 +0000 (23:03 +0000)]
Remove the last mentions of sub_ss and sub_sd from patterns.
I'll remove these two sub-register indexes shortly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160831
91177308-0d34-0410-b5e6-
96231b3b80d8