Devang Patel
5d8b2b3293
Handle last value assignments.
...
llvm-svn: 41063
2007-08-14 01:30:57 +00:00
Devang Patel
55b6a8f212
StartValue is already calculated.
...
llvm-svn: 41062
2007-08-14 00:15:45 +00:00
Evan Cheng
e79599dc2d
Now capable of rematerializing coalesced live intervals.
...
llvm-svn: 41061
2007-08-13 23:54:16 +00:00
Evan Cheng
215f802b75
Re-implement trivial rematerialization. This allows def MIs whose live intervals that are coalesced to be rematerialized.
...
llvm-svn: 41060
2007-08-13 23:45:17 +00:00
Evan Cheng
eef13203e7
Fix a typo pointd out by Maarten ter Huurne.
...
llvm-svn: 41059
2007-08-13 23:27:11 +00:00
Devang Patel
762259ba73
Preserve simple analysis.
...
llvm-svn: 41054
2007-08-13 22:22:13 +00:00
Devang Patel
e3ea62e49a
Preserve dominator info.
...
llvm-svn: 41053
2007-08-13 22:13:24 +00:00
Devang Patel
993388b1ee
Add methods to erase basic block entry.
...
llvm-svn: 41052
2007-08-13 22:10:29 +00:00
Devang Patel
d1d0316041
If NewBB dominates DestBB then DestBB is not part of NewBB's dominance frontier.
...
llvm-svn: 41051
2007-08-13 21:59:17 +00:00
Chris Lattner
80032c89e6
move assertion into mutex guard, a partial fix for PR1606.
...
llvm-svn: 41050
2007-08-13 20:08:16 +00:00
Dan Gohman
2390ff5060
When x86 addresses matching exceeds its recursion limit, check to
...
see if the base register is already occupied before assuming it can be
used. This fixes bogus code generation in the accompanying testcase.
llvm-svn: 41049
2007-08-13 20:03:06 +00:00
Chris Lattner
7dfec1ee54
Fix PR1607
...
llvm-svn: 41048
2007-08-13 18:42:37 +00:00
Chris Lattner
a41b2e2d2f
test that the ptr-to-method is succefully eliminated, leaving just the vtable dispatch.
...
llvm-svn: 41047
2007-08-13 17:17:03 +00:00
Chris Lattner
8674db5fbf
Constant fold: getelementptr (i8* inttoptr (i64 1 to i8*), i32 -1)
...
Into: inttoptr (i64 0 to i8*) -> null
This occurs in the example in PR1602. With this fixed, we now compile
the example in PR1602 into fully "devirtualized" code:
define void @_Z1g1S(%struct.S* noalias %s) {
entry: %tmp131415 = getelementptr %struct.S* %s, i32 0, i32 0 ; <i32 (...)***> [#uses=1] %tmp16 = load i32 (...)*** %tmp131415, align 4 ; <i32 (...)**> [#uses=1]
%tmp26277 = load i32 (...)** %tmp16 ; <i32 (...)*> [#uses=1]
%tmp2829 = bitcast i32 (...)* %tmp26277 to void (%struct.S*)* ; <void (%struct.S*)*> [#uses=1]
tail call void %tmp2829( %struct.S* %s )
ret void
}
This still has the vtable dispatch (as required) but does not have any pointer
to method cruft left.
llvm-svn: 41046
2007-08-13 17:09:08 +00:00
Evan Cheng
54b799dc76
Kill info update bugs.
...
llvm-svn: 41043
2007-08-13 07:12:23 +00:00
Reid Spencer
7ce13be5bb
Make use of the llvm-ld tool's new ability to read input from stdin to extract
...
the list of link time passes to be run, just as for opt, with the
-debug-pass=Arguments option.
llvm-svn: 41040
2007-08-13 06:19:51 +00:00
Reid Spencer
6c60a4c945
Don't build llvm-stub twice.
...
llvm-svn: 41039
2007-08-13 00:25:47 +00:00
Chris Lattner
cab9f1e32b
oops, forgot to commit this.
...
llvm-svn: 41034
2007-08-12 16:55:14 +00:00
Reid Spencer
8c5c7c8453
Change casts from old style to new style. This helps document the details
...
better, gives the compiler a chance to validate the cast and reduces warnings
if the user turns on -Wold-style-cast option.
llvm-svn: 41033
2007-08-12 08:12:35 +00:00
Devang Patel
63d1affed8
Split loops and do CFG cleanup.
...
llvm-svn: 41029
2007-08-12 07:02:51 +00:00
Reid Spencer
c71871ba30
Remove unused variables.
...
llvm-svn: 41028
2007-08-12 04:45:36 +00:00
Evan Cheng
3b211635e8
No need to remove dead range from soon-to-be-dead live interval. Its val# may be out of whack.
...
llvm-svn: 41024
2007-08-12 01:26:19 +00:00
Chris Lattner
afb3c33c2a
constant fold ptrtoint(inttoptr) with target data when available. This allows
...
us to fold the entry block of PR1602 to false instead of:
br i1 icmp eq (i32 and (i32 ptrtoint (void (%struct.S*)* inttoptr (i64
1 to void (%struct.S*)*) to i32), i32 1), i32 0), label %cond_next, label
%cond_true
llvm-svn: 41023
2007-08-11 23:49:01 +00:00
Chris Lattner
50f25115cd
Transform a load from an undef/zero global into an undef/global even if we
...
have complex pointer manipulation going on. This allows us to compile
stuff like this:
__m128i foo(__m128i x){
static const unsigned int c_0[4] = { 0, 0, 0, 0 };
__m128i v_Zero = _mm_loadu_si128((__m128i*)c_0);
x = _mm_unpacklo_epi8(x, v_Zero);
return x;
}
into:
_foo:
xorps %xmm1, %xmm1
punpcklbw %xmm1, %xmm0
ret
llvm-svn: 41022
2007-08-11 18:48:48 +00:00
Chris Lattner
fedbfd5f47
expand a note
...
llvm-svn: 41021
2007-08-11 18:19:07 +00:00
Chris Lattner
5f098dbbe5
With evan's explicit flag representation, hopefully we will finally be
...
able to 3-addressify away stuff like this:
movl %ecx, %eax
decl %eax
llvm-svn: 41020
2007-08-11 18:16:46 +00:00
Reid Spencer
07c9c99f36
Now that llvm-ld can accept - as input from stdin, use this feature to extract
...
the pass arguments that it supports.
llvm-svn: 41019
2007-08-11 16:11:22 +00:00
Reid Spencer
da7379cc57
Fix a comment typo noticed by Sandro Magi.
...
llvm-svn: 41018
2007-08-11 15:57:56 +00:00
Bill Wendling
e611c96a3c
64-bit SSSE3 ops that use MMX registers don't require 16-byte alignment.
...
Make a 'memop' pattern just for them.
llvm-svn: 41017
2007-08-11 09:52:53 +00:00
Evan Cheng
8968affb6d
Code to maintain kill information during register coalescing.
...
llvm-svn: 41016
2007-08-11 00:59:19 +00:00
Christopher Lamb
7e52a97df5
Use subregs to improve any_extend code generation when feasible.
...
llvm-svn: 41013
2007-08-10 22:22:41 +00:00
Christopher Lamb
6c79abee5d
Fix test so it passes.
...
llvm-svn: 41012
2007-08-10 22:20:57 +00:00
Christopher Lamb
450f6815b9
Increase efficiency of sign_extend_inreg by using subregisters for truncation. As the README suggests sign_extend_subreg is selected to (sext(trunc)).
...
llvm-svn: 41010
2007-08-10 21:48:46 +00:00
Christopher Lamb
4e6cae3eae
Edit README in light of previous LEA16 commit.
...
llvm-svn: 41009
2007-08-10 21:29:05 +00:00
Christopher Lamb
7196f0d724
Add 2-addr to 3-addr promotion code that allows 32-bit LEA to be used via subregisters when 16-bit LEA is disabled.
...
llvm-svn: 41007
2007-08-10 21:18:25 +00:00
Christopher Lamb
e0c9bd8d2e
Move isSubRegOf into MRegisterInfo. Fix a missed move elimination in LowerSubregs and add more debugging output there.
...
llvm-svn: 41005
2007-08-10 21:11:55 +00:00
Devang Patel
fa7277dd34
Do not overuse std::string. Pass around char * directly.
...
llvm-svn: 41001
2007-08-10 18:29:32 +00:00
Devang Patel
c8cff19c2e
Clone loop.
...
llvm-svn: 40998
2007-08-10 18:07:13 +00:00
Devang Patel
d412a2a0ed
Add utility to clone loops.
...
llvm-svn: 40997
2007-08-10 17:59:47 +00:00
Devang Patel
80f51489aa
Add #ifndef guard.
...
llvm-svn: 40991
2007-08-10 15:58:23 +00:00
Chris Lattner
15b13dc5f9
add #ifndef guards
...
llvm-svn: 40990
2007-08-10 15:53:08 +00:00
Chris Lattner
de900e3b6c
add Value::getNameStart/getNameLen() accessors.
...
llvm-svn: 40989
2007-08-10 15:34:35 +00:00
Dan Gohman
232e8feb40
Add a test script for counting lines. This can be used instead of the
...
"| grep foo | wc -l | grep 2" idiom used by many tests, so that, for
example, tests don't mistakenly accept a count of 12 when 2 is
expected. Also, the new form is more consice: "| grep foo | count 2".
llvm-svn: 40988
2007-08-10 15:07:05 +00:00
Dan Gohman
f18e94535f
Fix EXTRACT_ELEMENT, EXTRACT_SUBVECTOR, and EXTRACT_VECTOR_ELT to
...
use an intptr ValueType instead of i32 for the index operand in
getCopyToParts.
llvm-svn: 40987
2007-08-10 14:59:38 +00:00
Rafael Espindola
b20b9e985a
propagate struct size and alignment of byval arguments to the DAG
...
llvm-svn: 40986
2007-08-10 14:44:42 +00:00
Bill Wendling
d0bee665d3
For kicks, I though it would be fun to use the correct opcode.
...
llvm-svn: 40985
2007-08-10 09:00:17 +00:00
Chris Lattner
f570f023cf
memcpy with zero length is hugely expensive, so avoid it. This speeds up coallescing from 1.17s to 0.88s on siod.
...
llvm-svn: 40984
2007-08-10 07:02:50 +00:00
Chris Lattner
8995eae095
small speedup in the case where a smallvector is default ctor'd from
...
an empty vector. This speeds up llc slightly.
llvm-svn: 40983
2007-08-10 06:54:38 +00:00
Bill Wendling
55c3dc2409
Adding SSSE3 intrinsics.
...
llvm-svn: 40982
2007-08-10 06:22:27 +00:00
Chris Lattner
de5f6f921a
minor simplifications.
...
llvm-svn: 40981
2007-08-10 06:22:25 +00:00