mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +00:00
Set SetStore to false, to allow this pass to delete
dead loads. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56529 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
3e4fb70c6a
commit
035268eaf7
@ -46,7 +46,7 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
const MachineRegisterInfo &MRI = MF.getRegInfo();
|
const MachineRegisterInfo &MRI = MF.getRegInfo();
|
||||||
const TargetInstrInfo &TII = *MF.getTarget().getInstrInfo();
|
const TargetInstrInfo &TII = *MF.getTarget().getInstrInfo();
|
||||||
BitVector LivePhysRegs;
|
BitVector LivePhysRegs;
|
||||||
bool SawStore = true;
|
bool SawStore;
|
||||||
|
|
||||||
// Compute a bitvector to represent all non-allocatable physregs.
|
// Compute a bitvector to represent all non-allocatable physregs.
|
||||||
BitVector NonAllocatableRegs = TRI.getAllocatableSet(MF);
|
BitVector NonAllocatableRegs = TRI.getAllocatableSet(MF);
|
||||||
@ -79,6 +79,7 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
|
|||||||
MachineInstr *MI = &*MII;
|
MachineInstr *MI = &*MII;
|
||||||
|
|
||||||
// Don't delete instructions with side effects.
|
// Don't delete instructions with side effects.
|
||||||
|
SawStore = false;
|
||||||
if (MI->isSafeToMove(&TII, SawStore)) {
|
if (MI->isSafeToMove(&TII, SawStore)) {
|
||||||
// Examine each operand.
|
// Examine each operand.
|
||||||
bool AllDefsDead = true;
|
bool AllDefsDead = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user