summaryrefslogtreecommitdiff
path: root/lib/CodeGen/DeadMachineInstructionElim.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-09-24 00:07:08 +0000
committerDan Gohman <gohman@apple.com>2008-09-24 00:07:08 +0000
commit035268eaf79f5492792a965226ea3a2244e6853e (patch)
tree52ce464848490db44caacb10ee96f4fe628bc28e /lib/CodeGen/DeadMachineInstructionElim.cpp
parent3e4fb70c6af53a2d00e057a7e4a8f93eb2ff2112 (diff)
downloadllvm-035268eaf79f5492792a965226ea3a2244e6853e.tar.gz
llvm-035268eaf79f5492792a965226ea3a2244e6853e.tar.bz2
llvm-035268eaf79f5492792a965226ea3a2244e6853e.tar.xz
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
Diffstat (limited to 'lib/CodeGen/DeadMachineInstructionElim.cpp')
-rw-r--r--lib/CodeGen/DeadMachineInstructionElim.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/CodeGen/DeadMachineInstructionElim.cpp b/lib/CodeGen/DeadMachineInstructionElim.cpp
index c3cdbf0259..392e3b1b77 100644
--- a/lib/CodeGen/DeadMachineInstructionElim.cpp
+++ b/lib/CodeGen/DeadMachineInstructionElim.cpp
@@ -46,7 +46,7 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
const MachineRegisterInfo &MRI = MF.getRegInfo();
const TargetInstrInfo &TII = *MF.getTarget().getInstrInfo();
BitVector LivePhysRegs;
- bool SawStore = true;
+ bool SawStore;
// Compute a bitvector to represent all non-allocatable physregs.
BitVector NonAllocatableRegs = TRI.getAllocatableSet(MF);
@@ -79,6 +79,7 @@ bool DeadMachineInstructionElim::runOnMachineFunction(MachineFunction &MF) {
MachineInstr *MI = &*MII;
// Don't delete instructions with side effects.
+ SawStore = false;
if (MI->isSafeToMove(&TII, SawStore)) {
// Examine each operand.
bool AllDefsDead = true;