Devang Patel [Wed, 15 Aug 2007 03:31:47 +0000 (03:31 +0000)]
Cleanup removeBlocks.
Use dominance frontier to fixup incoming edges of successor blocks not domianted by DeadBB.
Use df_iterator to walk and delete basic blocks dominated by DeadBB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41095
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 15 Aug 2007 03:01:04 +0000 (03:01 +0000)]
Remove unneeded header file.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41094
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 15 Aug 2007 02:14:55 +0000 (02:14 +0000)]
Avoid triangle loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41093
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 14 Aug 2007 23:59:17 +0000 (23:59 +0000)]
Break infinite loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41091
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 14 Aug 2007 23:53:57 +0000 (23:53 +0000)]
Avoid nested loops at the moment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41090
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 23:34:50 +0000 (23:34 +0000)]
New test.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41087
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 23:25:37 +0000 (23:25 +0000)]
- If a def is dead, do not spill it.
- If the defs of a spilled rematerializable MI are dead after the spill store is deleted, delete
the def MI as well.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41086
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 23:21:10 +0000 (23:21 +0000)]
Test case for PR1596.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41085
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 23:19:28 +0000 (23:19 +0000)]
Fix for PR1596: AdjustCopiesBackFrom() should conservatively check if any of its sub-registers may overlap with the interval of the copy that's being coalesced.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41084
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 20:23:13 +0000 (20:23 +0000)]
If a MI's def is remat as well as spilled, and the store is later deemed dead, mark the def operand as isDead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41083
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 14 Aug 2007 18:35:57 +0000 (18:35 +0000)]
Fix dominance frontier update while removing blocks.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41082
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 14 Aug 2007 18:33:27 +0000 (18:33 +0000)]
Eliminate PHI nodes with constant values during normal GVN processing, even when
they're not related to eliminating a load.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41081
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 14 Aug 2007 18:16:29 +0000 (18:16 +0000)]
Be more aggressive in pruning unnecessary PHI nodes when doing PHI construction.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41080
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 14 Aug 2007 18:04:11 +0000 (18:04 +0000)]
Make GVN iterative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41078
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Tue, 14 Aug 2007 17:59:48 +0000 (17:59 +0000)]
Fix a case where GVN was failing to return true when it had, in fact, modified
the function.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41077
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 14 Aug 2007 16:53:52 +0000 (16:53 +0000)]
Assert sooner. Fix wordings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41075
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 14 Aug 2007 16:53:24 +0000 (16:53 +0000)]
No need to use iterator to erase basic block.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41074
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Aug 2007 16:19:35 +0000 (16:19 +0000)]
tcl seems to hate |& for some reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41073
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Tue, 14 Aug 2007 16:14:10 +0000 (16:14 +0000)]
switch this to use fastcc to avoid fpstack traffic on x86-32. Switch to
using the count script instead of wc -l
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41072
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 09:16:00 +0000 (09:16 +0000)]
Update test case. A spill should now be deleted.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41070
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 09:11:18 +0000 (09:11 +0000)]
If a spilled value is being reused and the use is a kill, that means there are
no more uses within the MBB and the spilled value isn't live out of the MBB.
Then it's safe to delete the spill store.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41069
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 05:51:03 +0000 (05:51 +0000)]
Spiller reuse test case.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41068
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 05:42:54 +0000 (05:42 +0000)]
If a rematerializable def is not deleted, i.e. it is also spilled, check if the
spilled value is available for reuse.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41067
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Tue, 14 Aug 2007 01:56:58 +0000 (01:56 +0000)]
Kill info update bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41064
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 14 Aug 2007 01:30:57 +0000 (01:30 +0000)]
Handle last value assignments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41063
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Tue, 14 Aug 2007 00:15:45 +0000 (00:15 +0000)]
StartValue is already calculated.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41062
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 13 Aug 2007 23:54:16 +0000 (23:54 +0000)]
Now capable of rematerializing coalesced live intervals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41061
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 13 Aug 2007 23:45:17 +0000 (23:45 +0000)]
Re-implement trivial rematerialization. This allows def MIs whose live intervals that are coalesced to be rematerialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41060
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 13 Aug 2007 23:27:11 +0000 (23:27 +0000)]
Fix a typo pointd out by Maarten ter Huurne.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41059
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 13 Aug 2007 22:22:13 +0000 (22:22 +0000)]
Preserve simple analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41054
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 13 Aug 2007 22:13:24 +0000 (22:13 +0000)]
Preserve dominator info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41053
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 13 Aug 2007 22:10:29 +0000 (22:10 +0000)]
Add methods to erase basic block entry.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41052
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Mon, 13 Aug 2007 21:59:17 +0000 (21:59 +0000)]
If NewBB dominates DestBB then DestBB is not part of NewBB's dominance frontier.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41051
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Aug 2007 20:08:16 +0000 (20:08 +0000)]
move assertion into mutex guard, a partial fix for PR1606.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41050
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Mon, 13 Aug 2007 20:03:06 +0000 (20:03 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41049
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Aug 2007 18:42:37 +0000 (18:42 +0000)]
Fix PR1607
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41048
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Aug 2007 17:17:03 +0000 (17:17 +0000)]
test that the ptr-to-method is succefully eliminated, leaving just the vtable dispatch.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41047
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Mon, 13 Aug 2007 17:09:08 +0000 (17:09 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41046
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Mon, 13 Aug 2007 07:12:23 +0000 (07:12 +0000)]
Kill info update bugs.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41043
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Aug 2007 06:19:51 +0000 (06:19 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41040
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Mon, 13 Aug 2007 00:25:47 +0000 (00:25 +0000)]
Don't build llvm-stub twice.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41039
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sun, 12 Aug 2007 16:55:14 +0000 (16:55 +0000)]
oops, forgot to commit this.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41034
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 12 Aug 2007 08:12:35 +0000 (08:12 +0000)]
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41033
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Sun, 12 Aug 2007 07:02:51 +0000 (07:02 +0000)]
Split loops and do CFG cleanup.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41029
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sun, 12 Aug 2007 04:45:36 +0000 (04:45 +0000)]
Remove unused variables.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41028
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sun, 12 Aug 2007 01:26:19 +0000 (01:26 +0000)]
No need to remove dead range from soon-to-be-dead live interval. Its val# may be out of whack.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41024
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Aug 2007 23:49:01 +0000 (23:49 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41023
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Aug 2007 18:48:48 +0000 (18:48 +0000)]
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
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41022
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Aug 2007 18:19:07 +0000 (18:19 +0000)]
expand a note
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41021
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Sat, 11 Aug 2007 18:16:46 +0000 (18:16 +0000)]
With evan's explicit flag representation, hopefully we will finally be
able to 3-addressify away stuff like this:
movl %ecx, %eax
decl %eax
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41020
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 11 Aug 2007 16:11:22 +0000 (16:11 +0000)]
Now that llvm-ld can accept - as input from stdin, use this feature to extract
the pass arguments that it supports.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41019
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Sat, 11 Aug 2007 15:57:56 +0000 (15:57 +0000)]
Fix a comment typo noticed by Sandro Magi.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41018
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Sat, 11 Aug 2007 09:52:53 +0000 (09:52 +0000)]
64-bit SSSE3 ops that use MMX registers don't require 16-byte alignment.
Make a 'memop' pattern just for them.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41017
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Sat, 11 Aug 2007 00:59:19 +0000 (00:59 +0000)]
Code to maintain kill information during register coalescing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41016
91177308-0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Fri, 10 Aug 2007 22:22:41 +0000 (22:22 +0000)]
Use subregs to improve any_extend code generation when feasible.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41013
91177308-0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Fri, 10 Aug 2007 22:20:57 +0000 (22:20 +0000)]
Fix test so it passes.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41012
91177308-0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Fri, 10 Aug 2007 21:48:46 +0000 (21:48 +0000)]
Increase efficiency of sign_extend_inreg by using subregisters for truncation. As the README suggests sign_extend_subreg is selected to (sext(trunc)).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41010
91177308-0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Fri, 10 Aug 2007 21:29:05 +0000 (21:29 +0000)]
Edit README in light of previous LEA16 commit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41009
91177308-0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Fri, 10 Aug 2007 21:18:25 +0000 (21:18 +0000)]
Add 2-addr to 3-addr promotion code that allows 32-bit LEA to be used via subregisters when 16-bit LEA is disabled.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41007
91177308-0d34-0410-b5e6-
96231b3b80d8
Christopher Lamb [Fri, 10 Aug 2007 21:11:55 +0000 (21:11 +0000)]
Move isSubRegOf into MRegisterInfo. Fix a missed move elimination in LowerSubregs and add more debugging output there.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41005
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 10 Aug 2007 18:29:32 +0000 (18:29 +0000)]
Do not overuse std::string. Pass around char * directly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41001
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 10 Aug 2007 18:07:13 +0000 (18:07 +0000)]
Clone loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40998
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 10 Aug 2007 17:59:47 +0000 (17:59 +0000)]
Add utility to clone loops.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40997
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 10 Aug 2007 15:58:23 +0000 (15:58 +0000)]
Add #ifndef guard.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40991
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 10 Aug 2007 15:53:08 +0000 (15:53 +0000)]
add #ifndef guards
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40990
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 10 Aug 2007 15:34:35 +0000 (15:34 +0000)]
add Value::getNameStart/getNameLen() accessors.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40989
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 10 Aug 2007 15:07:05 +0000 (15:07 +0000)]
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".
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40988
91177308-0d34-0410-b5e6-
96231b3b80d8
Dan Gohman [Fri, 10 Aug 2007 14:59:38 +0000 (14:59 +0000)]
Fix EXTRACT_ELEMENT, EXTRACT_SUBVECTOR, and EXTRACT_VECTOR_ELT to
use an intptr ValueType instead of i32 for the index operand in
getCopyToParts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40987
91177308-0d34-0410-b5e6-
96231b3b80d8
Rafael Espindola [Fri, 10 Aug 2007 14:44:42 +0000 (14:44 +0000)]
propagate struct size and alignment of byval arguments to the DAG
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40986
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 10 Aug 2007 09:00:17 +0000 (09:00 +0000)]
For kicks, I though it would be fun to use the correct opcode.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40985
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 10 Aug 2007 07:02:50 +0000 (07:02 +0000)]
memcpy with zero length is hugely expensive, so avoid it. This speeds up coallescing from 1.17s to 0.88s on siod.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40984
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 10 Aug 2007 06:54:38 +0000 (06:54 +0000)]
small speedup in the case where a smallvector is default ctor'd from
an empty vector. This speeds up llc slightly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40983
91177308-0d34-0410-b5e6-
96231b3b80d8
Bill Wendling [Fri, 10 Aug 2007 06:22:27 +0000 (06:22 +0000)]
Adding SSSE3 intrinsics.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40982
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 10 Aug 2007 06:22:25 +0000 (06:22 +0000)]
minor simplifications.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40981
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Fri, 10 Aug 2007 06:17:04 +0000 (06:17 +0000)]
avoid copying strings.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40980
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 10 Aug 2007 00:59:03 +0000 (00:59 +0000)]
Remove unncessary duplication.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40979
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 10 Aug 2007 00:53:35 +0000 (00:53 +0000)]
Calculate exit and start value of true loop and false loop respectively.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40978
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Fri, 10 Aug 2007 00:33:50 +0000 (00:33 +0000)]
ExitCondition and Induction variable are loop constraints
not split condition constraints.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40977
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Aug 2007 23:55:17 +0000 (23:55 +0000)]
unbreak the build
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40976
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Aug 2007 23:14:39 +0000 (23:14 +0000)]
Bug fix. ~1U marks the val# dead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40975
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 9 Aug 2007 22:51:36 +0000 (22:51 +0000)]
Patch 10 for long double. Doing constants right needs expanding ConstantFP
to handle values bigger than double. If we assume host==target and host
long double works correctly, this is not too bad, but we don't want to
have that limitation longterm. I could implement accepting double
constants as long double or something like that, which would lead to
incorrect codegen with no errors; the more I think about that the worse
it seems. Rather than do such a hack that would be backed out later,
I'm settling for giving reasonable error messages, for now.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40974
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Aug 2007 22:25:35 +0000 (22:25 +0000)]
Temporarily backing out this change until we know why some dejagnu tests are failing.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40973
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Aug 2007 21:59:35 +0000 (21:59 +0000)]
divb / mulb outputs to ah. Under x86-64 it's not legal to read ah if the instruction requires a rex prefix (i.e. outputs to r8b, etc.). So issue shift right by 8 on AX and then truncate it to 8 bits instead.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40972
91177308-0d34-0410-b5e6-
96231b3b80d8
Chris Lattner [Thu, 9 Aug 2007 19:05:49 +0000 (19:05 +0000)]
when we see a unaligned load from an insufficiently aligned global or
alloca, increase the alignment of the load, turning it into an aligned load.
This allows us to compile:
#include <xmmintrin.h>
__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:
punpcklbw _c_0.5944, %xmm0
ret
.data
.lcomm _c_0.5944,16,4 # c_0.5944
instead of:
_foo:
movdqu _c_0.5944, %xmm1
punpcklbw %xmm1, %xmm0
ret
.data
.lcomm _c_0.5944,16,2 # c_0.5944
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40971
91177308-0d34-0410-b5e6-
96231b3b80d8
Evan Cheng [Thu, 9 Aug 2007 18:05:17 +0000 (18:05 +0000)]
GR16_ sub-register class should be GR8_, not GR8. That is, it should only be 8-bit registers in 32-bit mode. Ditto for GR32_.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40970
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 9 Aug 2007 17:27:48 +0000 (17:27 +0000)]
Update per review comments.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40965
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Thu, 9 Aug 2007 04:42:44 +0000 (04:42 +0000)]
Make NonLocal and None const in the right way. :-)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40961
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Thu, 9 Aug 2007 01:39:01 +0000 (01:39 +0000)]
Traverse loop blocks' terminators to find split candidates.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40960
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 9 Aug 2007 01:04:01 +0000 (01:04 +0000)]
long double 9 of N. This finishes up the X86-32 bits
(constants are still not handled). Adds ConvertActions
to control fp-to-fp conversions (these are currently
defaulted for all other targets, so no changes there).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40958
91177308-0d34-0410-b5e6-
96231b3b80d8
Dale Johannesen [Thu, 9 Aug 2007 00:49:19 +0000 (00:49 +0000)]
Fix arguments for some Altivec instructions. From SWB.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40957
91177308-0d34-0410-b5e6-
96231b3b80d8
Scott Michel [Wed, 8 Aug 2007 23:23:31 +0000 (23:23 +0000)]
If a target really needs to custom lower constants, it should be allowed
to do so.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40955
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 8 Aug 2007 22:26:03 +0000 (22:26 +0000)]
Add more comments to memdep.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40953
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 8 Aug 2007 22:25:28 +0000 (22:25 +0000)]
Add cost analysis.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40952
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 8 Aug 2007 22:01:54 +0000 (22:01 +0000)]
Make memdep fit in 80 cols.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40950
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 8 Aug 2007 21:54:33 +0000 (21:54 +0000)]
Add one more comment.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40949
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 8 Aug 2007 21:53:20 +0000 (21:53 +0000)]
Cleanup and comment-ize the memdep header.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40948
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 8 Aug 2007 21:39:47 +0000 (21:39 +0000)]
Preserve dom info while processing one iteration loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40947
91177308-0d34-0410-b5e6-
96231b3b80d8
Owen Anderson [Wed, 8 Aug 2007 21:39:39 +0000 (21:39 +0000)]
Change the None and NonLocal markers in memdep to be const.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40946
91177308-0d34-0410-b5e6-
96231b3b80d8
Reid Spencer [Wed, 8 Aug 2007 21:19:01 +0000 (21:19 +0000)]
Separate program name from error message with a :
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40945
91177308-0d34-0410-b5e6-
96231b3b80d8
Devang Patel [Wed, 8 Aug 2007 21:18:27 +0000 (21:18 +0000)]
Clear split info.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40944
91177308-0d34-0410-b5e6-
96231b3b80d8