Mercurial > hg > truffle
comparison graal/com.oracle.graal.java/src/com/oracle/graal/java/GraphBuilderPhase.java @ 19380:9220566922ab
Parse time constant folding for div and float convert.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Sun, 15 Feb 2015 15:28:26 +0100 |
parents | b720a1e02fa0 |
children | 31442a6da26d |
comparison
equal
deleted
inserted
replaced
19379:b720a1e02fa0 | 19380:9220566922ab |
---|---|
297 index = iterateBlock(blocks, block); | 297 index = iterateBlock(blocks, block); |
298 } | 298 } |
299 processBlock(this, returnBlock); | 299 processBlock(this, returnBlock); |
300 processBlock(this, unwindBlock); | 300 processBlock(this, unwindBlock); |
301 | 301 |
302 if (Debug.isDumpEnabled()) { | 302 if (Debug.isDumpEnabled() && this.beforeReturnNode != startInstruction) { |
303 Debug.dump(currentGraph, "Bytecodes parsed: " + method.getDeclaringClass().getUnqualifiedName() + "." + method.getName()); | 303 Debug.dump(currentGraph, "Bytecodes parsed: " + method.getDeclaringClass().getUnqualifiedName() + "." + method.getName()); |
304 } | 304 } |
305 } | 305 } |
306 } | 306 } |
307 | 307 |
550 return MulNode.create(x, y); | 550 return MulNode.create(x, y); |
551 } | 551 } |
552 | 552 |
553 @Override | 553 @Override |
554 protected ValueNode genFloatDiv(Kind kind, ValueNode x, ValueNode y, boolean isStrictFP) { | 554 protected ValueNode genFloatDiv(Kind kind, ValueNode x, ValueNode y, boolean isStrictFP) { |
555 return new DivNode(x, y); | 555 return DivNode.create(x, y); |
556 } | 556 } |
557 | 557 |
558 @Override | 558 @Override |
559 protected ValueNode genFloatRem(Kind kind, ValueNode x, ValueNode y, boolean isStrictFP) { | 559 protected ValueNode genFloatRem(Kind kind, ValueNode x, ValueNode y, boolean isStrictFP) { |
560 return new RemNode(x, y); | 560 return new RemNode(x, y); |
610 return NormalizeCompareNode.create(x, y, isUnorderedLess, constantReflection); | 610 return NormalizeCompareNode.create(x, y, isUnorderedLess, constantReflection); |
611 } | 611 } |
612 | 612 |
613 @Override | 613 @Override |
614 protected ValueNode genFloatConvert(FloatConvert op, ValueNode input) { | 614 protected ValueNode genFloatConvert(FloatConvert op, ValueNode input) { |
615 return new FloatConvertNode(op, input); | 615 return FloatConvertNode.create(op, input); |
616 } | 616 } |
617 | 617 |
618 @Override | 618 @Override |
619 protected ValueNode genNarrow(ValueNode input, int bitCount) { | 619 protected ValueNode genNarrow(ValueNode input, int bitCount) { |
620 return NarrowNode.create(input, bitCount); | 620 return NarrowNode.create(input, bitCount); |