/** * Return true if this instruction is independent of the specified instruction. If instructions * are independent, than one instruction can be moved before or after the other instruction * without changing the semantics of the program. * * @param inst is the specified instruction */ public boolean independent(Instruction inst, RegisterSet registers) { if (inst.defs(rs1, registers)) return false; if (inst.uses(rd, registers)) return false; if (!(inst instanceof SparcInstruction)) return true; return independentCC((SparcInstruction) inst); }
/** * Return true if this instruction is independent of the specified instruction. If instructions * are independent, than one instruction can be moved before or after the other instruction * without changing the semantics of the program. * * @param inst is the specified instruction */ public boolean independent(Instruction inst, RegisterSet registers) { if (inst.uses(ra, registers)) { return false; } return !inst.defs(rb, registers); }