Mon P Wang
7d89d61387
Added MemOperands to Atomic operations since Atomics touches memory.
...
Added abstract class MemSDNode for any Node that have an associated MemOperand
Changed atomic.lcs => atomic.cmp.swap, atomic.las => atomic.load.add, and
atomic.lss => atomic.load.sub
llvm-svn: 52706
2008-06-25 08:15:39 +00:00
Matthijs Kooijman
45bffc6580
Fix a (false) warning on darwin.
...
llvm-svn: 52705
2008-06-25 08:12:16 +00:00
Matthijs Kooijman
9b78534b71
Fix some cosmetics in comments.
...
llvm-svn: 52704
2008-06-25 08:10:21 +00:00
Evan Cheng
9a3db8fb91
- Use O(1) check of basic block size limit.
...
- Avoid speculatively execute vector ops.
llvm-svn: 52703
2008-06-25 07:50:12 +00:00
Chris Lattner
73b52018e9
Fix PR2488, a case where we deleted stack restores too aggressively.
...
llvm-svn: 52702
2008-06-25 05:59:28 +00:00
Evan Cheng
bab5925a0b
Enable two-address remat by default.
...
llvm-svn: 52701
2008-06-25 01:16:38 +00:00
Owen Anderson
968d4e2444
Use push_back rather than operator[], which is incorrect in this cases. Unfortunately, this slow the testcase down a little bit,
...
but only marginally.
llvm-svn: 52700
2008-06-25 01:05:05 +00:00
Dan Gohman
a08868acb3
Append to the ActiveTimers std::vector before looking at the timer instead
...
of after, so that any reallocation it does doesn't get counted for the pass
being timed. This probably doesn't account for a timing discrepancy I was
looking into, but I'm fixing it anyway.
llvm-svn: 52693
2008-06-24 22:07:07 +00:00
Dale Johannesen
fdf8fe6c03
Add v2f32 (MMX) type to X86. Support is primitive:
...
load,store,call,return,bitcast. This is enough to
make call and return work.
llvm-svn: 52691
2008-06-24 22:01:44 +00:00
Owen Anderson
673cae8561
In ConstantArray::getAsString(), we know the size of the resultant string in advance so we can pre-allocate it and just fill in
...
the entries. This improves the time for the AsmPrinter on InstructionCombining.cpp from 0.4248s to 0.3370s.
llvm-svn: 52690
2008-06-24 21:58:29 +00:00
Owen Anderson
8b2f51618a
Use SmallVector instead of std::vector for a minor compile time improvement.
...
llvm-svn: 52689
2008-06-24 21:44:59 +00:00
Dan Gohman
b9384c5e87
Revert 52645, the loop unroller changes. It caused a regression in 252.eon.
...
llvm-svn: 52688
2008-06-24 20:44:42 +00:00
Dan Gohman
e9f0a28c64
Fix a typo in a comment.
...
llvm-svn: 52687
2008-06-24 18:00:21 +00:00
Dan Gohman
fcb2dc2dd6
Use const_cast instead of a C-style cast.
...
llvm-svn: 52684
2008-06-24 17:47:37 +00:00
Matthijs Kooijman
ff03ea8aeb
Commit the new DeadArgElim pass again, this time with the gcc bootstrap failures fixed.
...
Also add a testcase to reproduce the gcc bootstrap failure in very much reduced form.
llvm-svn: 52677
2008-06-24 16:30:26 +00:00
Matthijs Kooijman
bb456f6b42
Rename a few variables to be more consistent.
...
llvm-svn: 52672
2008-06-24 09:14:10 +00:00
Evan Cheng
a62f5f0f82
If it's determined safe, remat MOV32r0 (i.e. xor r, r) and others as it is instead of using the longer MOV32ri instruction.
...
llvm-svn: 52670
2008-06-24 07:10:51 +00:00
Dan Gohman
29c5903a80
Fix some signed vs. unsigned issues in array and vector handling.
...
llvm-svn: 52664
2008-06-24 01:17:52 +00:00
Dan Gohman
9941a2dab3
Add a note about a potential PIC optimization.
...
llvm-svn: 52663
2008-06-24 00:53:07 +00:00
Dan Gohman
ebc59c90b7
Fixes for being compiled PIC on Linux. This isn't the most
...
general solution possible, but it's a fairly simple one.
Based on a patch from the OpenGTL project!
llvm-svn: 52662
2008-06-24 00:50:01 +00:00
Dan Gohman
0e992740a0
A brief survey of priority_queue usage in the tree turned this up
...
as a questionable case, but the code isn't actually needed.
llvm-svn: 52657
2008-06-23 23:51:16 +00:00
Bill Wendling
2501066409
This situation can occur:
...
,------.
| |
| v
| t2 = phi ... t1 ...
| |
| v
| t1 = ...
| ... = ... t1 ...
| |
`------'
where there is a use in a PHI node that's a predecessor to the defining
block. We don't want to mark all predecessors as having the value "alive" in
this case. Also, the assert was too restrictive and didn't handle this case.
llvm-svn: 52655
2008-06-23 23:41:14 +00:00
Dan Gohman
95743e3078
Use the new PriorityQueue in ScheduleDAGList too, which also
...
needs arbitrary-element removal.
llvm-svn: 52654
2008-06-23 23:40:09 +00:00
Dan Gohman
11d367fd0c
Use use_empty() instead of getNumUses(), avoiding a use list traversal.
...
llvm-svn: 52651
2008-06-23 23:23:49 +00:00
Owen Anderson
f2386cff4f
Use getMBBEndIdx rather than assuming that the end is right after the last instruction in the block.
...
llvm-svn: 52649
2008-06-23 22:12:23 +00:00
Dan Gohman
24ec9f54bc
Fix spelling and grammar in a comment.
...
llvm-svn: 52648
2008-06-23 22:11:52 +00:00
Dan Gohman
7f6ee1cd4b
Revamp the loop unroller, extending it to correctly update PHI nodes
...
in the presence of out-of-loop users of in-loop values and the trip
count is not a known multiple of the unroll count, and to be a bit
simpler overall. This fixes PR2253.
llvm-svn: 52645
2008-06-23 21:29:41 +00:00
Evan Cheng
73bdede529
Remove option used to debug stack coloring bugs. It's no longer needed since stack coloring is now bug free.
...
llvm-svn: 52644
2008-06-23 21:24:32 +00:00
Evan Cheng
174f11c202
Disable PRE. It's breaking bootstrapping.
...
llvm-svn: 52643
2008-06-23 21:22:35 +00:00
Dan Gohman
71a0e81d0b
Move a DenseMap's declaration outside of a loop, and just call
...
clear() on each iteration. This avoids allocating and deallocating
all of DenseMap's memory on each iteration.
llvm-svn: 52642
2008-06-23 21:15:00 +00:00
Evan Cheng
6e5a126667
Instead of adding an isSS field to LiveInterval to denote stack slot. Use top bit of 'reg' instead. If the top bit is set, than the LiveInterval represents a stack slot live interval.
...
llvm-svn: 52639
2008-06-23 21:03:19 +00:00
Wojciech Matyjewicz
1de28ac425
First step to fix PR2088. Implement routine to compute the
...
multiplicative inverse of a given number. Modify udivrem to allow input and
output pairs of arguments to overlap. Patch is based on the work by Chandler
Carruth.
llvm-svn: 52638
2008-06-23 19:39:50 +00:00
Dan Gohman
5a929b928e
Update the .cvs files.
...
llvm-svn: 52637
2008-06-23 18:43:26 +00:00
Dan Gohman
7492d685c7
Fix the types for NumElements variables, and add a comment
...
explaining why empty array constants use ValID::createUndef().
llvm-svn: 52636
2008-06-23 18:40:28 +00:00
Owen Anderson
0dcae02ad4
Tighten the conditions under which we do PRE, remove some unneeded code, and correct our preserved analyses list, since we
...
do now change the CFG by splitting critical edges during PRE.
llvm-svn: 52631
2008-06-23 17:49:45 +00:00
Chris Lattner
b992911447
minor tidying of comments.
...
llvm-svn: 52630
2008-06-23 17:11:23 +00:00
Dan Gohman
b52f318a0c
Remove two convenience constructors because they're now private, and the
...
private implementation doesn't really need the convenience.
llvm-svn: 52629
2008-06-23 16:48:17 +00:00
Dan Gohman
12a793b025
Use std::copy instead of a loop.
...
llvm-svn: 52628
2008-06-23 16:45:24 +00:00
Dan Gohman
d9e2c8b72a
More changes from Chris' review: simplify getIndices and avoid
...
copying its return value.
llvm-svn: 52627
2008-06-23 16:39:44 +00:00
Dan Gohman
84cef04f76
Duncan pointed out this code could be tidied.
...
llvm-svn: 52624
2008-06-23 15:29:14 +00:00
Duncan Sands
e7f2c80a8c
Port some integer multiplication fixes from LegalizeDAG.
...
Bail out with an error if there is no libcall available
for the given size of integer.
llvm-svn: 52622
2008-06-23 15:15:44 +00:00
Duncan Sands
86e6f1a3b6
Support for expanding the result of EXTRACT_ELEMENT.
...
llvm-svn: 52621
2008-06-23 15:08:15 +00:00
Duncan Sands
1b83cbdebe
Cleanup up LegalizeTypes handling of loads and
...
stores.
llvm-svn: 52620
2008-06-23 14:19:45 +00:00
Owen Anderson
7d4e8f976c
At Chris' suggestion, move the liveness and worklist datastructures into
...
instance variables so they can be allocated just once, and reuse the worklist
as the dead list as well.
llvm-svn: 52618
2008-06-23 06:13:12 +00:00
Dan Gohman
62d8bc0480
Improve LSR's dead-phi detection to handle use-def cycles
...
with more than two nodes.
llvm-svn: 52617
2008-06-22 20:44:02 +00:00
Dan Gohman
4ada89e819
Use Loop::block_iterator.
...
llvm-svn: 52616
2008-06-22 20:18:58 +00:00
Dan Gohman
90894ac18b
Generalize createSCEV to be able to form SCEV expressions from
...
ConstantExprs.
llvm-svn: 52615
2008-06-22 19:56:46 +00:00
Dan Gohman
81c83d9a1d
Use SCEVAddRecExpr::isAffine.
...
llvm-svn: 52614
2008-06-22 19:23:09 +00:00
Dan Gohman
c1aa753f00
Remove unnecessary #includes.
...
llvm-svn: 52613
2008-06-22 19:21:26 +00:00
Dan Gohman
311865bd24
Move a few more SCEVExpander methods out-of-line.
...
llvm-svn: 52612
2008-06-22 19:09:18 +00:00