Chris Lattner
6782f56054
stop making PATypeHolder's so crazily.
...
llvm-svn: 52364
2008-06-16 21:17:12 +00:00
Evan Cheng
4e7b7b21a2
Horizontal-add instructions are not commutative.
...
llvm-svn: 52363
2008-06-16 21:16:24 +00:00
Evan Cheng
7b87eb0128
Switch over to SetVector to ensure same order of iterations do not vary across runs.
...
llvm-svn: 52361
2008-06-16 21:08:17 +00:00
Gabor Greif
ae2be0f217
Move some documentation from the header file into ProgrammersManual. About to improve.
...
llvm-svn: 52360
2008-06-16 21:06:12 +00:00
Chris Lattner
3dfc439a87
use a real associative container for type association instead of using
...
a vector with a linear search. This speeds up the linking testcase
in PR1860 from 0.965s to 0.385s on my system.
llvm-svn: 52357
2008-06-16 21:00:18 +00:00
Evan Cheng
d27948e716
- Add "Commutative" property to intrinsics. This allows tblgen to generate the commuted variants for dagisel matching code.
...
- Mark lots of X86 intrinsics as "Commutative" to allow load folding.
llvm-svn: 52353
2008-06-16 20:29:38 +00:00
Evan Cheng
acd614c262
mpsadbw is commutable.
...
llvm-svn: 52352
2008-06-16 20:25:59 +00:00
Chris Lattner
f87729aa1f
bail out sooner if we have two concrete but different types.
...
llvm-svn: 52351
2008-06-16 20:03:01 +00:00
Chris Lattner
896c38c96a
simplify some code.
...
llvm-svn: 52350
2008-06-16 19:55:40 +00:00
Chris Lattner
fe3ddf06a8
Apply a patch from Nathan Keynes, which speeds up llvm-link on
...
the testcases in PR1860 from taking more than 1 hour (when I killed it)
to taking 1s.
llvm-svn: 52347
2008-06-16 19:48:08 +00:00
Owen Anderson
63a604a316
Remove special case handling of empty MBBs now that we assign indices to them.
...
llvm-svn: 52345
2008-06-16 19:32:40 +00:00
Chris Lattner
1a604edf16
handle vectors. Any integers that got here would necessarily be different already.
...
llvm-svn: 52341
2008-06-16 18:27:53 +00:00
Chris Lattner
c24aba4724
Simplify ResolveTypes by pulling the null case out into the one
...
client that cares and simplifying its control flow.
Remove the DestST argument to ResolveTypes and RecursiveResolveTypes*
which are dead now.
llvm-svn: 52340
2008-06-16 18:19:05 +00:00
Evan Cheng
6c6518787b
Iterating over SmallPtrSet is not deterministic.
...
llvm-svn: 52339
2008-06-16 18:17:09 +00:00
Chris Lattner
cebf7d79b3
simplify RecursiveResolveTypes and ResolveTypes by pulling the naming out of
...
ResolveTypes into the one place that needs it.
llvm-svn: 52338
2008-06-16 18:11:40 +00:00
Chris Lattner
b2c9317b8d
Add a new flag that disables symbol lookup with dlsym when set. This allows
...
a JIT client to completely control symbol lookup with the LazyFunctionCreator
interface.
llvm-svn: 52335
2008-06-16 17:44:14 +00:00
Chris Lattner
ddfa0590ae
Add support for icache invalidation on non-darwin ppc systems.
...
Patch by Gary Benson!
llvm-svn: 52332
2008-06-16 17:04:06 +00:00
Owen Anderson
3c4bb80d78
Re-enable empty block indexing by default, since it doesn't seem to have any
...
impact on code quality or compile time.
llvm-svn: 52329
2008-06-16 16:58:24 +00:00
Matthijs Kooijman
2ba9a750dd
Make BuildSubAggregate use FindInsertedElement again to prevent it from
...
inserting extractvalues. In particular, this prevents the insertion of
extractvalues that can't be folded away later. Also add an example of when this
stuff is needed.
llvm-svn: 52328
2008-06-16 14:13:46 +00:00
Matthijs Kooijman
544c9b2fb0
Make the InsertBefore argument to FindInsertedValue optional, so you can find an inserted value without modifying the code.
...
llvm-svn: 52319
2008-06-16 13:28:31 +00:00
Matthijs Kooijman
238b1e8d69
Pass around Instruction* instead of Instruction& in FindInsertedValue and friends.
...
llvm-svn: 52318
2008-06-16 13:13:08 +00:00
Matthijs Kooijman
bdd5cae51c
Make testcase check for extractvalue instead of extractelement.
...
llvm-svn: 52317
2008-06-16 13:03:44 +00:00
Matthijs Kooijman
dedcf00fcc
80 column fixes.
...
llvm-svn: 52316
2008-06-16 12:57:37 +00:00
Matthijs Kooijman
1dd7d9cdc1
Move FindScalarValue from InstructionCombining.cpp to ValueTracking.cpp. While
...
I'm at it, rename it to FindInsertedValue.
The only functional change is that newly created instructions are no longer
added to instcombine's worklist, but that is not really necessary anyway (and
I'll commit some improvements next that will completely remove the need).
llvm-svn: 52315
2008-06-16 12:48:21 +00:00
Matthijs Kooijman
e01197eaa9
Store the result of multiple identical run lines in a temporary file.
...
llvm-svn: 52314
2008-06-16 12:21:25 +00:00
Matthijs Kooijman
fedd2bd496
Add comment.
...
llvm-svn: 52313
2008-06-16 12:20:05 +00:00
Argyrios Kyrtzidis
65f671fd74
Minor comment fix.
...
llvm-svn: 52312
2008-06-16 10:14:09 +00:00
Matthijs Kooijman
f6b1a51a94
Fix PR numbers, I accidentally switched two digits.
...
llvm-svn: 52311
2008-06-16 09:38:23 +00:00
Duncan Sands
78bdcc813e
Allow these transforms for types like i256 while
...
still excluding types like i1 (not byte sized)
and i120 (loading an i120 requires loading an i64,
an i32, an i16 and an i8, which is expensive).
llvm-svn: 52310
2008-06-16 08:14:38 +00:00
Evan Cheng
93d91a771c
Fix read after free found by valgrind.
...
llvm-svn: 52309
2008-06-16 07:34:17 +00:00
Evan Cheng
2dfe8c2435
Add option to commuteInstruction() which forces it to create a new (commuted) instruction.
...
llvm-svn: 52308
2008-06-16 07:33:11 +00:00
Owen Anderson
114ce854d1
Make indexing empty basic blocks an option for the moment.
...
llvm-svn: 52306
2008-06-16 07:10:49 +00:00
Chris Lattner
ffb6425556
add a const version of stripPointerCasts
...
llvm-svn: 52305
2008-06-16 06:43:06 +00:00
Chris Lattner
0bc9e4aa8f
simplify some code by using a helper function. This really really
...
wants a 'nocapture' predicate.
llvm-svn: 52304
2008-06-16 06:38:26 +00:00
Chris Lattner
35be1f6c83
move a bunch of predicates up into their own section
...
in this file, no other changes.
llvm-svn: 52303
2008-06-16 06:30:22 +00:00
Chris Lattner
12453dd555
Other parts of this code treat noalias arguments as objects for
...
the purposes of escape analysis.
llvm-svn: 52302
2008-06-16 06:28:01 +00:00
Chris Lattner
e987a3bdd1
If we are checking to see if the result of a call aliases a
...
pointer derived from a local allocation, if the local allocation
never escapes, the pointers can't alias. This implements PR2436
llvm-svn: 52301
2008-06-16 06:19:11 +00:00
Owen Anderson
1077c28bb1
Assign indices to empty basic blocks. This will be necessary for StrongPHIElimination in the near future.
...
llvm-svn: 52300
2008-06-16 06:18:41 +00:00
Chris Lattner
4e38446b34
Refactor basicaa's main alias function somethin' fierce.
...
This fixes several minor bugs (such as returning noalias
for comparisons between external weak functions an null) but
is mostly a cleanup.
llvm-svn: 52299
2008-06-16 06:10:11 +00:00
Chris Lattner
63195a4694
this is unneeded now.
...
llvm-svn: 52298
2008-06-16 04:25:39 +00:00
Chris Lattner
0b945db11c
Switch from generating the int128 typedefs based on targetdata to generating
...
them based on the end-compiler's capabilities. This fixes PR2453
llvm-svn: 52297
2008-06-16 04:25:29 +00:00
Chris Lattner
61de4d6454
resolve PR2453 by adding a run line.
...
llvm-svn: 52296
2008-06-16 04:22:39 +00:00
Chris Lattner
ac4fe3f51c
Fix the crash on SimplifyLibCalls/2005-05-20-sprintf-crash.ll
...
llvm-svn: 52295
2008-06-16 04:10:21 +00:00
Chris Lattner
09554fd076
fix pr2460
...
llvm-svn: 52294
2008-06-16 04:02:40 +00:00
Duncan Sands
2dffe1cc15
The transforms in visitEXTRACT_VECTOR_ELT are
...
not valid if the load is volatile. Hopefully
all wrong DAG combiner transforms of volatile
loads and stores have now been caught.
llvm-svn: 52293
2008-06-15 20:12:31 +00:00
Duncan Sands
2671518b8b
LegalizeTypes support for INSERT_VECTOR_ELT with
...
a non-constant index.
llvm-svn: 52292
2008-06-15 20:00:14 +00:00
Wojciech Matyjewicz
58f5cc8864
Fix PR2434. When scanning for exising binary operator to reuse don't
...
take into account the instrucion pointed by InsertPt. Thanks to it,
returning the new value of InsertPt to the InsertBinop() caller can be
avoided. The bug was, actually, in visitAddRecExpr() method which wasn't
correctly handling changes of InsertPt. There shouldn't be any
performance regression, as -gvn pass (run after -indvars) removes any
redundant binops.
llvm-svn: 52291
2008-06-15 19:07:39 +00:00
Wojciech Matyjewicz
0f03682725
Add a missing semicolon.
...
llvm-svn: 52290
2008-06-15 18:02:47 +00:00
Argyrios Kyrtzidis
7236092c4c
Add an "exe" suffix only if the output file has no suffix at all.
...
llvm-svn: 52289
2008-06-15 15:20:16 +00:00
Argyrios Kyrtzidis
6f81329b15
Fix the sys::Path::getSuffix() implementation.
...
llvm-svn: 52288
2008-06-15 15:15:19 +00:00