comparison graal/GraalCompiler/src/com/sun/c1x/graph/IR.java @ 2530:7e7f817bdb28

Removed dead code elimination2
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Apr 2011 17:05:26 +0200
parents 6edc0306038e
children eca17668badf
comparison
equal deleted inserted replaced
2529:a3653aee17f7 2530:7e7f817bdb28
88 C1XTimers.HIR_OPTIMIZE.start(); 88 C1XTimers.HIR_OPTIMIZE.start();
89 } 89 }
90 90
91 optimize1(); 91 optimize1();
92 computeLinearScanOrder(); 92 computeLinearScanOrder();
93 optimize2();
94 93
95 if (C1XOptions.PrintTimers) { 94 if (C1XOptions.PrintTimers) {
96 C1XTimers.HIR_OPTIMIZE.stop(); 95 C1XTimers.HIR_OPTIMIZE.stop();
97 } 96 }
98 } 97 }
109 TTY.print(String.format("%3d blocks | ", this.numberOfBlocks())); 108 TTY.print(String.format("%3d blocks | ", this.numberOfBlocks()));
110 } 109 }
111 } 110 }
112 111
113 private void optimize1() { 112 private void optimize1() {
114 // do basic optimizations
115 /*if (C1XOptions.PhiSimplify) {
116 new PhiSimplifier(this);
117 verifyAndPrint("After phi simplification");
118 }*/
119 if (C1XOptions.OptDeadCodeElimination1) { 113 if (C1XOptions.OptDeadCodeElimination1) {
120 new LivenessMarker(this).removeDeadCode(); 114 new LivenessMarker(this).removeDeadCode();
121 verifyAndPrint("After dead code elimination 1"); 115 verifyAndPrint("After dead code elimination 1");
122 } 116 }
123 } 117 }
137 ComputeLinearScanOrder computeLinearScanOrder = new ComputeLinearScanOrder(compilation.stats.blockCount, startBlock); 131 ComputeLinearScanOrder computeLinearScanOrder = new ComputeLinearScanOrder(compilation.stats.blockCount, startBlock);
138 orderedBlocks = computeLinearScanOrder.linearScanOrder(); 132 orderedBlocks = computeLinearScanOrder.linearScanOrder();
139 compilation.stats.loopCount = computeLinearScanOrder.numLoops(); 133 compilation.stats.loopCount = computeLinearScanOrder.numLoops();
140 computeLinearScanOrder.printBlocks(); 134 computeLinearScanOrder.printBlocks();
141 } 135 }
142 }
143
144 private void optimize2() {
145 if (C1XOptions.OptDeadCodeElimination2) {
146 new LivenessMarker(this).removeDeadCode();
147 verifyAndPrint("After dead code elimination 2");
148 }
149
150 } 136 }
151 137
152 /** 138 /**
153 * Gets the linear scan ordering of blocks as a list. 139 * Gets the linear scan ordering of blocks as a list.
154 * @return the blocks in linear scan order 140 * @return the blocks in linear scan order