Bob Wilson
38fc88ee5d
The SSAUpdater should avoid recursive traversals of the CFG, since that may
...
blow out the stack for really big functions. Start by fixing an easy case.
llvm-svn: 100126
2010-04-01 18:46:59 +00:00
Bob Wilson
ac229124f4
Rewrite part of the SSAUpdater to be more careful about inserting redundant
...
PHIs. The previous algorithm was unable to reliably detect when existing
PHIs in a cycle can be reused. I'm still working on reducing a testcase.
Radar 7711900.
llvm-svn: 100047
2010-03-31 20:51:00 +00:00
Bob Wilson
7577e948e4
Avoid creating redundant PHIs in SSAUpdater::GetValueInMiddleOfBlock.
...
This was already being done in SSAUpdater::GetValueAtEndOfBlock so I've
just changed SSAUpdater to check for existing PHIs in both places.
llvm-svn: 94690
2010-01-27 22:01:02 +00:00
David Greene
3774a38fdf
Change errs() to dbgs().
...
llvm-svn: 92603
2010-01-05 01:26:49 +00:00
Chris Lattner
eaa25da8bb
improve indentation avoid a pointless conversion from weakvh to trackingvh,
...
no functionality change.
llvm-svn: 91848
2009-12-21 22:43:03 +00:00
Chris Lattner
8fb07c5a21
fix PR5837 by having SSAUpdate reuse phi nodes for the
...
'GetValueInMiddleOfBlock' case, instead of inserting
duplicates.
A similar fix is almost certainly needed by the machine-level
SSAUpdate implementation.
llvm-svn: 91820
2009-12-21 07:16:11 +00:00
Chris Lattner
2bd9609992
add an assert to make it really clear what this is doing. Return singularval as
...
a compile time perf optimization to avoid a load.
llvm-svn: 90507
2009-12-04 01:03:32 +00:00
Chris Lattner
7f903681ac
alternate fix for PR5258 which avoids worklist problems, with reduced testcase.
...
llvm-svn: 84667
2009-10-20 20:27:49 +00:00
Torok Edwin
cf10ec951d
Fix PR5258, jump-threading creating invalid PHIs.
...
When an incoming value for a PHI is updated, we must also updated all other
incoming values for the same BB to match, otherwise we create invalid PHIs.
llvm-svn: 84638
2009-10-20 15:42:00 +00:00
Duncan Sands
0058c7bcb0
Strip trailing white space.
...
llvm-svn: 84256
2009-10-16 15:20:13 +00:00
Chris Lattner
9c382cebc5
add a simple helper method.
...
llvm-svn: 83745
2009-10-10 23:41:48 +00:00
Chris Lattner
249265de06
add ability for clients of SSAUpdater to find out about the
...
PHI nodes inserted.
llvm-svn: 83744
2009-10-10 23:15:24 +00:00
Chris Lattner
67cdd8b567
add the ability to get a rewritten value from the middle of a block,
...
not just at the end. Add a big comment explaining when this could
be useful (which never happens for jump threading).
llvm-svn: 83741
2009-10-10 23:00:11 +00:00
Chris Lattner
e474a8d3a7
rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect
...
what it does.
llvm-svn: 83740
2009-10-10 22:41:58 +00:00
Chris Lattner
65e69a77e1
use a typedef instead of spelling out an insane type. Yay for auto someday.
...
llvm-svn: 83707
2009-10-10 09:09:20 +00:00
Chris Lattner
60d4e69c81
Implement an efficient and fully general SSA update mechanism that
...
works on unstructured CFGs. This implements PR217, our oldest open PR.
llvm-svn: 83705
2009-10-10 09:04:27 +00:00