DBG_VALUE does not have any side effects; it also makes no sense to mark it cheap as a copy.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123031 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2011-01-07 21:08:26 +00:00
parent eaff66a895
commit 30a343aeed
4 changed files with 9 additions and 4 deletions

View File

@@ -336,7 +336,9 @@ bool PeepholeOptimizer::runOnMachineFunction(MachineFunction &MF) {
MachineInstr *MI = &*MII++;
LocalMIs.insert(MI);
if (MI->getDesc().hasUnmodeledSideEffects())
if (MI->isLabel() || MI->isPHI() || MI->isImplicitDef() ||
MI->isKill() || MI->isInlineAsm() || MI->isDebugValue() ||
MI->getDesc().hasUnmodeledSideEffects())
continue;
if (MI->getDesc().isCompare()) {