Mercurial > hg > graal-jvmci-8
diff graal/GraalCompiler/src/com/sun/c1x/opt/LivenessMarker.java @ 2531:eca17668badf
Remove dead code elimination 1
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 27 Apr 2011 18:17:18 +0200 |
parents | 16b9a8b5ad39 |
children | fa3bda50cbfd |
line wrap: on
line diff
--- a/graal/GraalCompiler/src/com/sun/c1x/opt/LivenessMarker.java Wed Apr 27 17:05:26 2011 +0200 +++ b/graal/GraalCompiler/src/com/sun/c1x/opt/LivenessMarker.java Wed Apr 27 18:17:18 2011 +0200 @@ -24,7 +24,6 @@ import static com.sun.c1x.ir.Value.Flag.*; -import com.sun.c1x.*; import com.sun.c1x.graph.*; import com.sun.c1x.ir.*; import com.sun.c1x.value.*; @@ -79,28 +78,6 @@ return count; } - public void removeDeadCode() { - // second pass: remove dead instructions from blocks - ir.startBlock.iteratePreOrder(new BlockClosure() { - public void apply(BlockBegin block) { - Instruction prev = block; - Instruction i = block.next(); - while (i != null) { - if (i.isLive()) { - prev.resetNext(i); // skip any previous dead instructions - prev = i; - } else { - C1XMetrics.DeadCodeEliminated++; - } - i = i.next(); - } - } - }); - // clear all marks on all instructions - valueMarker.clearAll(); - deoptMarker.clearAll(); - } - private static class Link { final Value value; Link next;