mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-13 04:38:24 +00:00
Teach MachineLICM and MachineSink how to clear kill flags conservatively
when they move instructions. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103737 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -938,6 +938,16 @@ isRegTiedToDefOperand(unsigned UseOpIdx, unsigned *DefOpIdx) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
/// clearKillInfo - Clears kill flags on all operands.
|
||||
///
|
||||
void MachineInstr::clearKillInfo() {
|
||||
for (unsigned i = 0, e = getNumOperands(); i != e; ++i) {
|
||||
MachineOperand &MO = getOperand(i);
|
||||
if (MO.isReg() && MO.isUse())
|
||||
MO.setIsKill(false);
|
||||
}
|
||||
}
|
||||
|
||||
/// copyKillDeadInfo - Copies kill / dead operand properties from MI.
|
||||
///
|
||||
void MachineInstr::copyKillDeadInfo(const MachineInstr *MI) {
|
||||
|
Reference in New Issue
Block a user