diff options
author | Evan Cheng <evan.cheng@apple.com> | 2011-01-07 21:08:26 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2011-01-07 21:08:26 +0000 |
commit | 0638c20e7c6a084e454368c072f4bbe44c571479 (patch) | |
tree | b22793dee7202f40e1ef224652b90f419c009645 /llvm/lib/CodeGen/MachineInstr.cpp | |
parent | 134cde912a9ae7103d6c3bf7f2c1a6b2758b1ab3 (diff) | |
download | llvm-0638c20e7c6a084e454368c072f4bbe44c571479.zip llvm-0638c20e7c6a084e454368c072f4bbe44c571479.tar.gz llvm-0638c20e7c6a084e454368c072f4bbe44c571479.tar.bz2 |
DBG_VALUE does not have any side effects; it also makes no sense to mark it cheap as a copy.
llvm-svn: 123031
Diffstat (limited to 'llvm/lib/CodeGen/MachineInstr.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineInstr.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/MachineInstr.cpp b/llvm/lib/CodeGen/MachineInstr.cpp index bc2a545..ccb2ffb 100644 --- a/llvm/lib/CodeGen/MachineInstr.cpp +++ b/llvm/lib/CodeGen/MachineInstr.cpp @@ -1115,7 +1115,9 @@ bool MachineInstr::isSafeToMove(const TargetInstrInfo *TII, SawStore = true; return false; } - if (TID->isTerminator() || TID->hasUnmodeledSideEffects()) + + if (isLabel() || isDebugValue() || + TID->isTerminator() || TID->hasUnmodeledSideEffects()) return false; // See if this instruction does a load. If so, we have to guarantee that the |