Mercurial > hg > graal-compiler
diff graal/GraalCompiler/src/com/sun/c1x/gen/PhiSimplifier.java @ 2791:6d14aa4fbf90
Gotos removed (except for exception dispatch chains and edge splitting).
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 25 May 2011 20:03:05 +0200 |
parents | 398b8fa5dc81 |
children | 189ffb7d1d84 |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/gen/PhiSimplifier.java Wed May 25 19:29:40 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/gen/PhiSimplifier.java Wed May 25 20:03:05 2011 +0200 @@ -44,6 +44,11 @@ return x; } Phi phi = (Phi) x; + + if (phi.valueCount() == 1) { + return (Value) phi.replace(phi.valueAt(0)); + } + if (phi.checkFlag(Value.Flag.PhiCannotSimplify)) { // already tried, cannot simplify this phi return phi;