Mercurial > hg > truffle
comparison graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java @ 19622:0e90dbf0b9fd
Add merge boolean property to ExplodeLoop annotation to indicate that backward branches should be merged if possible.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 27 Feb 2015 14:06:36 +0100 |
parents | 711f46f691cf |
children | 490f2c54c28a |
comparison
equal
deleted
inserted
replaced
19621:34e984e9560e | 19622:0e90dbf0b9fd |
---|---|
201 private ValueNode unwindValue; | 201 private ValueNode unwindValue; |
202 private FixedWithNextNode beforeUnwindNode; | 202 private FixedWithNextNode beforeUnwindNode; |
203 | 203 |
204 private FixedWithNextNode lastInstr; // the last instruction added | 204 private FixedWithNextNode lastInstr; // the last instruction added |
205 private final boolean explodeLoops; | 205 private final boolean explodeLoops; |
206 private final boolean mergeExplosions; | |
206 private Stack<ExplodedLoopContext> explodeLoopsContext; | 207 private Stack<ExplodedLoopContext> explodeLoopsContext; |
207 private int nextPeelIteration = 1; | 208 private int nextPeelIteration = 1; |
208 private boolean controlFlowSplit; | 209 private boolean controlFlowSplit; |
209 | 210 |
210 private FixedWithNextNode[] firstInstructionArray; | 211 private FixedWithNextNode[] firstInstructionArray; |
228 } | 229 } |
229 | 230 |
230 LoopExplosionPlugin loopExplosionPlugin = graphBuilderConfig.getLoopExplosionPlugin(); | 231 LoopExplosionPlugin loopExplosionPlugin = graphBuilderConfig.getLoopExplosionPlugin(); |
231 if (loopExplosionPlugin != null) { | 232 if (loopExplosionPlugin != null) { |
232 explodeLoops = loopExplosionPlugin.shouldExplodeLoops(method); | 233 explodeLoops = loopExplosionPlugin.shouldExplodeLoops(method); |
234 if (explodeLoops) { | |
235 mergeExplosions = loopExplosionPlugin.shouldMergeExplosions(method); | |
236 } else { | |
237 mergeExplosions = false; | |
238 } | |
233 } else { | 239 } else { |
234 explodeLoops = false; | 240 explodeLoops = false; |
241 mergeExplosions = false; | |
235 } | 242 } |
236 } | 243 } |
237 | 244 |
238 public ValueNode getReturnValue() { | 245 public ValueNode getReturnValue() { |
239 return returnValue; | 246 return returnValue; |