Devang Patel
cd6b697945
Preserve dominance frontier while trivially unswitching loop.
...
llvm-svn: 52438
2008-06-18 02:16:38 +00:00
Dan Gohman
7cc14c55da
Auto-upgrade code for multiple-value return statements. This code
...
isn't actually called yet.
llvm-svn: 52435
2008-06-17 23:38:43 +00:00
Dan Gohman
d8ca05f4ee
In InsertValueInst's copy ctor, actually copy the operands.
...
llvm-svn: 52434
2008-06-17 23:25:49 +00:00
Owen Anderson
75f3732b23
We don't want to find dependencies within the same block in this case. It leads to incorrect results because
...
we're detecting something at or after the call we're querying on.
llvm-svn: 52433
2008-06-17 22:27:06 +00:00
Dan Gohman
4a3125ba29
Implement the ExtractValueInst::getIndexedType that accepts one
...
index value.
llvm-svn: 52432
2008-06-17 21:07:55 +00:00
Evan Cheng
f873ed1b10
Live-through live interval is [mbb start, mbb end+1].
...
llvm-svn: 52431
2008-06-17 20:13:36 +00:00
Evan Cheng
1eb69314fa
When extending a liveinterval by commuting, don't throw away the live ranges that are not affected.
...
llvm-svn: 52430
2008-06-17 20:11:16 +00:00
Ted Kremenek
90ada832be
Consistently set "Buckets[NumBuckets] = reinterpret_cast<void*>(-1)" throughout FoldingSet.cpp.
...
llvm-svn: 52425
2008-06-17 19:12:43 +00:00
Owen Anderson
2505e0c36b
Add an insertBefore method for attaching previously unattached instructions,
...
such as those created by clone(), to a basic block.
llvm-svn: 52424
2008-06-17 18:29:27 +00:00
Evan Cheng
5e4188f1ac
It's not safe to remove SUBREG_TO_REG that looks like identity copies, e.g. movl %eax, %eax on x86-64 actually does a zero-extend.
...
llvm-svn: 52421
2008-06-17 17:59:16 +00:00
Anton Korobeynikov
f51ed6a161
Add one more 'magic' define :)
...
llvm-svn: 52420
2008-06-17 17:57:43 +00:00
Anton Korobeynikov
8e5d9214ba
Unbreak non-PPC builds
...
llvm-svn: 52419
2008-06-17 17:38:31 +00:00
Anton Korobeynikov
7d7dcd52db
Provide generic hooks for icache invalidation. Add PPC implementation.
...
Patch by Gary Benson!
llvm-svn: 52418
2008-06-17 17:30:05 +00:00
Chris Lattner
aecc3750d1
revert recent patch which is causing widespread breakage.
...
llvm-svn: 52415
2008-06-17 17:06:43 +00:00
Evan Cheng
84a9055e27
Don't forget to initialize SymbolSearchingDisabled.
...
llvm-svn: 52414
2008-06-17 16:49:02 +00:00
Duncan Sands
4b50fde2c4
Fix typo that changed the logic to something wrong.
...
Spotted by Nick Lewycky.
llvm-svn: 52411
2008-06-17 15:55:30 +00:00
Duncan Sands
4c69995fb2
Split type expansion into ExpandInteger and ExpandFloat
...
rather than bundling them together. Rename FloatToInt
to PromoteFloat (better, if not perfect). Reorganize
files by types rather than by operations.
llvm-svn: 52408
2008-06-17 14:27:01 +00:00
Matthijs Kooijman
332836d68d
Learn IPConstProp to propagate arguments that are directly returned. Strictly
...
speaking these are not constant values. However, when a function always returns
one of its arguments, then from the point of view of each caller the return
value is constant (or at least a known value) and can be replaced.
llvm-svn: 52397
2008-06-17 12:20:24 +00:00
Matthijs Kooijman
f03c1ae407
Learn IPConstProp to look at individual return values and propagate them
...
individually.
Also learn IPConstProp how returning first class aggregates work, in addition
to old style multiple return instructions.
Modify the return-constants testscase to confirm this behaviour.
llvm-svn: 52396
2008-06-17 12:02:52 +00:00
Matthijs Kooijman
8369c67cbd
Use a SmallVector instead of an array, since auto_ptr doesn't handle arrays
...
properly.
llvm-svn: 52390
2008-06-17 08:24:37 +00:00
Chris Lattner
1b08c4a709
add a new -enable-value-prop flag for llcbeta, that enables propagation
...
of value info (sign/zero ext info) from one MBB to another. This doesn't
handle much right now because of two limitations:
1) only handles zext/sext, not random bit propagation (no assert exists
for this)
2) doesn't handle phis.
llvm-svn: 52383
2008-06-17 06:09:18 +00:00
Duncan Sands
0ae829e5d1
Fix spelling.
...
llvm-svn: 52381
2008-06-17 03:24:13 +00:00
Evan Cheng
e47ca0940f
Rather than avoiding to wrap ISD::DECLARE GV operand in X86ISD::Wrapper, simply handle it at dagisel time with x86 specific isel code.
...
llvm-svn: 52377
2008-06-17 02:01:22 +00:00
Chris Lattner
56cdea6b3e
Add a missing ~ (dtor became ctor) which caused crashes on a bunch of stuff.
...
llvm-svn: 52374
2008-06-16 23:06:51 +00:00
Evan Cheng
1cde1f8d5e
Do not issue identity copies.
...
llvm-svn: 52373
2008-06-16 22:52:53 +00:00
Dan Gohman
ab0dccba6b
Refine the change in r52258 for avoiding use-before-def conditions
...
when changing the stride of a comparison so that it's slightly
more precise, by having it scan the instruction list to determine
if there is a use of the condition after the point where the
condition will be inserted.
llvm-svn: 52371
2008-06-16 22:34:15 +00:00
Chris Lattner
caefb0b5c7
switch TypeHasCycleThroughItself from using an std::set to using a SmallPtrSet,
...
this speeds up the linking testcase in PR1860 by 44% (.379 -> 0.263)
llvm-svn: 52365
2008-06-16 21:20:58 +00:00
Chris Lattner
9be15893c5
stop making PATypeHolder's so crazily.
...
llvm-svn: 52364
2008-06-16 21:17:12 +00:00
Evan Cheng
a5e30076a0
Horizontal-add instructions are not commutative.
...
llvm-svn: 52363
2008-06-16 21:16:24 +00:00
Evan Cheng
319e9a4f63
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
Chris Lattner
eee6f995dd
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
b90be27f8c
mpsadbw is commutable.
...
llvm-svn: 52352
2008-06-16 20:25:59 +00:00
Chris Lattner
fe677e9570
bail out sooner if we have two concrete but different types.
...
llvm-svn: 52351
2008-06-16 20:03:01 +00:00
Chris Lattner
85b66d18b9
simplify some code.
...
llvm-svn: 52350
2008-06-16 19:55:40 +00:00
Chris Lattner
8cb74995cc
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
476e91ab75
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
9995302b02
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
8aa89e4181
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
a72cdcd1a2
Iterating over SmallPtrSet is not deterministic.
...
llvm-svn: 52339
2008-06-16 18:17:09 +00:00
Chris Lattner
e9bb8552af
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
86d4f3a2a9
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
8b69e8a647
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
773b2d3ac3
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
fa4d0b883a
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
69801d4fd1
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
86cda9e050
Pass around Instruction* instead of Instruction& in FindInsertedValue and friends.
...
llvm-svn: 52318
2008-06-16 13:13:08 +00:00
Matthijs Kooijman
5cb387735d
80 column fixes.
...
llvm-svn: 52316
2008-06-16 12:57:37 +00:00
Matthijs Kooijman
e92e18be5a
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
Argyrios Kyrtzidis
06f0d441f7
Minor comment fix.
...
llvm-svn: 52312
2008-06-16 10:14:09 +00:00
Duncan Sands
37c1f5267b
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