Chris Lattner
96b3955e9b
fix some warnings when assertions are disabled.
...
llvm-svn: 52587
2008-06-21 19:47:03 +00:00
Dan Gohman
1e71795b8d
Remove a redundant return.
...
llvm-svn: 52585
2008-06-21 19:34:57 +00:00
Dan Gohman
015a5ca374
Remove ScheduleDAG's SUnitMap altogether. Instead, use SDNode's NodeId
...
field, which is otherwise unused after instruction selection, as an index
into the SUnit array.
llvm-svn: 52583
2008-06-21 19:18:17 +00:00
Dan Gohman
4099d0bf27
Add a priority queue class, which is a wrapper around std::priority_queue
...
and provides fairly efficient removal of arbitrary elements. Switch
ScheduleDAGRRList from std::set to this new priority queue.
llvm-svn: 52582
2008-06-21 18:35:25 +00:00
Duncan Sands
1dd6ef8f8e
Support for load/store of expanded float types. I
...
don't know if a truncating store is possible here,
but added support for it anyway.
llvm-svn: 52577
2008-06-21 17:00:47 +00:00
Dan Gohman
3a5a96e045
Change ScheduleDAG's SUnitMap from DenseMap<SDNode*, vector<SUnit*> >
...
to DenseMap<SDNode*, SUnit*>, and adjust the way cloned SUnit nodes are
handled so that only the original node needs to be in the map.
This speeds up llc on 447.dealII.llvm.bc by about 2%.
llvm-svn: 52576
2008-06-21 15:52:51 +00:00
Evan Cheng
2ff47edc37
Enable PRE.
...
llvm-svn: 52574
2008-06-21 07:26:53 +00:00
Evan Cheng
1d07cd32c2
Undo spill weight tweak. Need to investigate the performance regressions.
...
llvm-svn: 52572
2008-06-21 06:45:54 +00:00
Dan Gohman
62fb667283
Simplify some template parameterization.
...
llvm-svn: 52571
2008-06-21 01:08:22 +00:00
Evan Cheng
b65bceda9c
Back out Matthijs' DAE patches. It's miscompiling gcc driver.
...
llvm-svn: 52570
2008-06-21 00:31:44 +00:00
Evan Cheng
c1f551b43e
Enhanced heuristic to determine the *best* register to spill. Instead of picking the register with the lowest spill weight. Consider (up to) 2 additional registers with spill weights that are close to the lowest spill weight. The one with fewest defs and uses that conflicts with the current interval (weighted by loop depth) is the spill candidate.
...
This is not always a win, but there are much more wins than loses and wins tend to be more noticeable.
llvm-svn: 52554
2008-06-20 21:45:16 +00:00
Duncan Sands
59b9db1fb6
Share some code that is common between integer and
...
float expansion (and sometimes vector splitting too).
llvm-svn: 52548
2008-06-20 18:40:50 +00:00
Duncan Sands
bccd4c58ba
Rename the operation of turning a float type into an
...
integer of the same type. Before it was "promotion",
but this is confusing because it is quite different
to promotion of integers. Call it "softening" instead,
inspired by "soft float".
llvm-svn: 52546
2008-06-20 17:49:55 +00:00
Dan Gohman
10e3188458
Clean up some uses of std::distance, now that we have allnodes_size.
...
llvm-svn: 52545
2008-06-20 17:15:19 +00:00
Dan Gohman
6a75f18b3b
Clean up a use of std::distance.
...
llvm-svn: 52544
2008-06-20 17:11:32 +00:00
Dan Gohman
fcc6f11fc3
Tidy up some commments and use the getAggregateOperand and
...
getInsertedValueOperand accessors. Thanks Matthijs!
llvm-svn: 52543
2008-06-20 16:41:17 +00:00
Dan Gohman
3968f90c4c
Fix the conditions under which SCCP should examine insertvalue
...
instructions. Thanks to Matthijs Kooijman for pointing this out!
llvm-svn: 52542
2008-06-20 16:39:44 +00:00
Matthijs Kooijman
54efc9f60e
80 column and trailing whitespace fixes.
...
llvm-svn: 52539
2008-06-20 15:34:07 +00:00
Matthijs Kooijman
7a75a306ff
Don't let DeadArgumentElimination attempt to update callers when the return
...
type wasn't changed.
llvm-svn: 52538
2008-06-20 15:25:43 +00:00
Matthijs Kooijman
9a9a6f1122
Don't let DeadArgElimination change the return type ({} into void and {T}
...
into T) when no return values are actually dead.
llvm-svn: 52537
2008-06-20 15:16:45 +00:00
Matthijs Kooijman
1d019c28b3
Explicitely track if any arguments or return values were removed in
...
DeadArgumentElimination and assert that the function type does not change if
nothing was changed. This should catch subtle changes in function type that are
not intended.
llvm-svn: 52536
2008-06-20 14:28:52 +00:00
Matthijs Kooijman
35ac78c162
Remove debug output.
...
llvm-svn: 52535
2008-06-20 14:03:35 +00:00
Matthijs Kooijman
a3222e3730
Recommit r52459, rewriting of the dead argument elimination pass.
...
This is a fixed version that no longer uses multimap::equal_range, which
resulted in a pointer invalidation problem.
Also, DAE::InspectedFunctions was not really necessary, so it got removed.
Lastly, this version no longer applies the extra arg hack on functions who did
not have any arguments to start with.
llvm-svn: 52532
2008-06-20 09:36:16 +00:00
Owen Anderson
5213d215e0
Really disable PRE.
...
llvm-svn: 52531
2008-06-20 08:59:13 +00:00
Chris Lattner
9ab7735924
Fix an error handling redefinition of linkonce functions where the
...
types differ. Patch by Nathan Keynes!
llvm-svn: 52527
2008-06-20 05:29:39 +00:00
Chris Lattner
e588f546c5
Fix PR2471, which is a bug involving an invalid promotion from a conditional load.
...
llvm-svn: 52525
2008-06-20 05:12:56 +00:00
Gordon Henriksen
50ca4ebe97
Add C binding for ExecutionEngine::addGlobalMapping.
...
llvm-svn: 52523
2008-06-20 02:16:11 +00:00
Dan Gohman
359de5a04e
Teach ReturnInst lowering about aggregate return values.
...
llvm-svn: 52522
2008-06-20 01:29:26 +00:00
Owen Anderson
3231e506cb
Change around the data structures used to store availability sets, resulting in a GVN+PRE that is faster that GVN alone was before.
...
llvm-svn: 52521
2008-06-20 01:15:47 +00:00
Dan Gohman
b4ee9dfc2d
Teach SCCP about insertvalue and extractvalue, and about
...
propagating constants across aggregate return values when
insertvalue and extractvalue are used.
llvm-svn: 52520
2008-06-20 01:15:44 +00:00
Dan Gohman
029d1e045e
Teach InlineFunction how to differentiate between multiple-value
...
return statements and aggregate returns so that it handles both
correctly.
llvm-svn: 52519
2008-06-20 01:03:44 +00:00
Evan Cheng
d4c055e1f8
Disable PRE for now. It seems to be breaking llvm-gcc bootstrapping.
...
llvm-svn: 52518
2008-06-20 01:01:07 +00:00
Dan Gohman
0d86d31373
Fix the index calculations for the extractvalue lowering code.
...
llvm-svn: 52517
2008-06-20 00:54:19 +00:00
Dan Gohman
826ad19523
Simplify the ComputeLinearIndex logic and fix a few bugs.
...
llvm-svn: 52516
2008-06-20 00:53:00 +00:00
Dan Gohman
bcddb92f4e
Simplify this code. Thanks Chris!
...
llvm-svn: 52514
2008-06-20 00:47:44 +00:00
Evan Cheng
4006f4cdf0
ISD::UNDEF should be expanded recursively / iteratively.
...
llvm-svn: 52508
2008-06-19 22:01:11 +00:00
Owen Anderson
c979fcf8ff
Add a hidden -disable-pre flag for testing purposes. This should be removed
...
once benchmarking is completed.
llvm-svn: 52506
2008-06-19 19:57:25 +00:00
Owen Anderson
35fb8dbfef
PRE requires that critical edges be split.
...
llvm-svn: 52505
2008-06-19 19:54:19 +00:00
Bill Wendling
68bdf9f6d4
Remove dead code causing a warning.
...
llvm-svn: 52502
2008-06-19 18:00:44 +00:00
Dan Gohman
98d028eb42
Use the common API for adding instructions to basic blocks instead of
...
using BasicBlock::getInstList.
llvm-svn: 52500
2008-06-19 17:53:32 +00:00
Owen Anderson
87d761460e
Be sure to remove values from the value numbering table after we delete them.
...
This fixes a failure on povray.
llvm-svn: 52499
2008-06-19 17:53:26 +00:00
Dan Gohman
a18aa3f3a2
Use Instruction::moveBefore instead of manipulating the instruction list
...
directly.
llvm-svn: 52498
2008-06-19 17:47:47 +00:00
Dan Gohman
01679b25c0
Avoid using BasicBlock::getInstList directly in a few places.
...
llvm-svn: 52497
2008-06-19 17:37:25 +00:00
Owen Anderson
aa850d32db
Revert support for insertvalue and extractvalue instructions for the moment.
...
GVN expects that all inputs which to an instruction fall somewhere in the value
hierarchy, which isn't true for these.
llvm-svn: 52496
2008-06-19 17:25:39 +00:00
Dan Gohman
cd78a0e385
Use the transferSuccessors helper function.
...
llvm-svn: 52495
2008-06-19 17:22:29 +00:00
Dan Gohman
68c5bdd4f5
Delete dead code.
...
llvm-svn: 52494
2008-06-19 17:18:39 +00:00
Matthijs Kooijman
41c5b9a77c
Use a CallSite to find the nth argument of a call/invoke instruction instead of
...
using getOperand() directly. This makes things work with invoke instructions as
well.
llvm-svn: 52489
2008-06-19 08:53:24 +00:00
Duncan Sands
054b82d555
Fix some warnings reported by gcc-4.3. Hopefully
...
this still compiles on windows - I can't test!
llvm-svn: 52488
2008-06-19 08:47:31 +00:00
Evan Cheng
b12290e31b
Missed a check.
...
llvm-svn: 52487
2008-06-19 06:17:19 +00:00
Eli Friedman
570aa6f801
Fix a bug with <8 x i16> shuffle lowering on X86 where parts of the
...
shuffle could be skipped. The check is invalid because the loop index i
doesn't correspond to the element actually inserted. The correct check is
already done a few lines earlier, for whether the element is already in
the right spot, so this shouldn't have any effect on the codegen for
code that was already correct.
llvm-svn: 52486
2008-06-19 06:09:51 +00:00