Don't waste time trying to CSE labels, phis, inline asm. Definitely avoid cse implici...
authorEvan Cheng <evan.cheng@apple.com>
Mon, 8 Mar 2010 23:49:12 +0000 (23:49 +0000)
committerEvan Cheng <evan.cheng@apple.com>
Mon, 8 Mar 2010 23:49:12 +0000 (23:49 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98009 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/MachineCSE.cpp

index ce8ebbc601092404d4d5a245927fcabccadfc9db..a0023feb986cd980021c91fb36f5585a3976e89f 100644 (file)
@@ -171,6 +171,10 @@ bool MachineCSE::hasLivePhysRegDefUse(MachineInstr *MI, MachineBasicBlock *MBB){
 }
 
 bool MachineCSE::isCSECandidate(MachineInstr *MI) {
+  if (MI->isLabel() || MI->isPHI() || MI->isImplicitDef() ||
+      MI->isKill() || MI->isInlineAsm())
+    return false;
+
   // Ignore copies or instructions that read / write physical registers
   // (except for dead defs of physical registers).
   unsigned SrcReg, DstReg, SrcSubIdx, DstSubIdx;