comparison graal/GraalCompiler/src/com/sun/c1x/graph/IR.java @ 2531:eca17668badf

Remove dead code elimination 1
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Apr 2011 18:17:18 +0200
parents 7e7f817bdb28
children e1b3db8031ee
comparison
equal deleted inserted replaced
2530:7e7f817bdb28 2531:eca17668badf
26 26
27 import com.sun.c1x.*; 27 import com.sun.c1x.*;
28 import com.sun.c1x.debug.*; 28 import com.sun.c1x.debug.*;
29 import com.sun.c1x.ir.*; 29 import com.sun.c1x.ir.*;
30 import com.sun.c1x.observer.*; 30 import com.sun.c1x.observer.*;
31 import com.sun.c1x.opt.*;
32 import com.sun.c1x.value.*; 31 import com.sun.c1x.value.*;
33 32
34 /** 33 /**
35 * This class implements the overall container for the HIR (high-level IR) graph 34 * This class implements the overall container for the HIR (high-level IR) graph
36 * and directs its construction, optimization, and finalization. 35 * and directs its construction, optimization, and finalization.
86 if (C1XOptions.PrintTimers) { 85 if (C1XOptions.PrintTimers) {
87 C1XTimers.HIR_CREATE.stop(); 86 C1XTimers.HIR_CREATE.stop();
88 C1XTimers.HIR_OPTIMIZE.start(); 87 C1XTimers.HIR_OPTIMIZE.start();
89 } 88 }
90 89
91 optimize1();
92 computeLinearScanOrder(); 90 computeLinearScanOrder();
93 91
94 if (C1XOptions.PrintTimers) { 92 if (C1XOptions.PrintTimers) {
95 C1XTimers.HIR_OPTIMIZE.stop(); 93 C1XTimers.HIR_OPTIMIZE.stop();
96 } 94 }
104 assert startBlock != null; 102 assert startBlock != null;
105 verifyAndPrint("After graph building"); 103 verifyAndPrint("After graph building");
106 104
107 if (C1XOptions.PrintCompilation) { 105 if (C1XOptions.PrintCompilation) {
108 TTY.print(String.format("%3d blocks | ", this.numberOfBlocks())); 106 TTY.print(String.format("%3d blocks | ", this.numberOfBlocks()));
109 }
110 }
111
112 private void optimize1() {
113 if (C1XOptions.OptDeadCodeElimination1) {
114 new LivenessMarker(this).removeDeadCode();
115 verifyAndPrint("After dead code elimination 1");
116 } 107 }
117 } 108 }
118 109
119 private void computeLinearScanOrder() { 110 private void computeLinearScanOrder() {
120 if (C1XOptions.GenLIR) { 111 if (C1XOptions.GenLIR) {