[llvm-commits] [llvm] r98009 - /llvm/trunk/lib/CodeGen/MachineCSE.cpp

Evan Cheng evan.cheng at apple.com
Mon Mar 8 15:49:12 PST 2010


Author: evancheng
Date: Mon Mar  8 17:49:12 2010
New Revision: 98009

URL: http://llvm.org/viewvc/llvm-project?rev=98009&view=rev
Log:
Don't waste time trying to CSE labels, phis, inline asm. Definitely avoid cse implicit-def for obvious performance reason.

Modified:
    llvm/trunk/lib/CodeGen/MachineCSE.cpp

Modified: llvm/trunk/lib/CodeGen/MachineCSE.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/MachineCSE.cpp?rev=98009&r1=98008&r2=98009&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/MachineCSE.cpp (original)
+++ llvm/trunk/lib/CodeGen/MachineCSE.cpp Mon Mar  8 17:49:12 2010
@@ -171,6 +171,10 @@
 }
 
 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;





More information about the llvm-commits mailing list