Bob Wilson
08cc4030dd
Rewrite another SSAUpdater function to avoid recursion.
...
llvm-svn: 100147
2010-04-01 23:05:58 +00:00
Bob Wilson
bfd85d79c1
Change another SSAUpdater function to avoid recursion.
...
llvm-svn: 100131
2010-04-01 20:04:30 +00:00
Bob Wilson
39e3a8e9f7
Simplify the code to check for existing PHIs, now that it is only used in
...
one place. This removes the template function added in svn 94690.
llvm-svn: 100130
2010-04-01 19:53:48 +00:00
Bob Wilson
205385244c
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
2a872616de
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
2e1a609654
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
991e882855
Change errs() to dbgs().
...
llvm-svn: 92603
2010-01-05 01:26:49 +00:00
Chris Lattner
1cbad45619
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
c54fd1e777
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
422a3ff7d5
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
803539f022
alternate fix for PR5258 which avoids worklist problems, with reduced testcase.
...
llvm-svn: 84667
2009-10-20 20:27:49 +00:00
Torok Edwin
bdcd45a9d6
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
4cde5474aa
Strip trailing white space.
...
llvm-svn: 84256
2009-10-16 15:20:13 +00:00
Chris Lattner
0aa320ae4d
add a simple helper method.
...
llvm-svn: 83745
2009-10-10 23:41:48 +00:00
Chris Lattner
acf73d9839
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
db4d523cca
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
9899ce267c
rename GetValueInBlock -> GetValueAtEndOfBlock to better reflect
...
what it does.
llvm-svn: 83740
2009-10-10 22:41:58 +00:00
Chris Lattner
0561804097
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
9c5aa00411
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