comparison graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java @ 2537:4a016ff4d2df

Clean up on LIRGenerator and related.
author Thomas Wuerthinger <thomas@wuerthinger.net>
date Wed, 27 Apr 2011 19:53:46 +0200
parents 3fca504f28ba
children e1ba5a93e997
comparison
equal deleted inserted replaced
2536:099f2a12788a 2537:4a016ff4d2df
665 assert arg.object instanceof LIRItem; 665 assert arg.object instanceof LIRItem;
666 LIRItem item = (LIRItem) arg.object; 666 LIRItem item = (LIRItem) arg.object;
667 if (canBeConstant) { 667 if (canBeConstant) {
668 return item.instruction.operand(); 668 return item.instruction.operand();
669 } else { 669 } else {
670 item.loadItem(var.kind); 670 CiKind kind = var.kind;
671 if (kind == CiKind.Byte || kind == CiKind.Boolean) {
672 item.loadByteItem();
673 } else {
674 item.loadItem();
675 }
671 return item.result(); 676 return item.result();
672 } 677 }
673 } 678 }
674 } 679 }
675 680
1514 * for storing the result of an instruction. 1519 * for storing the result of an instruction.
1515 * 1520 *
1516 * @param instruction an instruction that produces a result value 1521 * @param instruction an instruction that produces a result value
1517 */ 1522 */
1518 protected CiValue makeOperand(Value instruction) { 1523 protected CiValue makeOperand(Value instruction) {
1524 if (instruction == null) {
1525 return CiValue.IllegalValue;
1526 }
1519 assert instruction.isLive(); 1527 assert instruction.isLive();
1520 CiValue operand = instruction.operand(); 1528 CiValue operand = instruction.operand();
1521 if (operand.isIllegal()) { 1529 if (operand.isIllegal()) {
1522 if (instruction instanceof Phi) { 1530 if (instruction instanceof Phi) {
1523 // a phi may not have an operand yet if it is for an exception block 1531 // a phi may not have an operand yet if it is for an exception block