From c9e8621268cc818bdde073e7fbbf25e78dc7cdb1 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Mon, 8 Mar 2010 23:49:12 +0000 Subject: [PATCH] Don't waste time trying to CSE labels, phis, inline asm. Definitely avoid cse implicit-def for obvious performance reason. llvm-svn: 98009 --- llvm/lib/CodeGen/MachineCSE.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/llvm/lib/CodeGen/MachineCSE.cpp b/llvm/lib/CodeGen/MachineCSE.cpp index ce8ebbc60109..a0023feb986c 100644 --- a/llvm/lib/CodeGen/MachineCSE.cpp +++ b/llvm/lib/CodeGen/MachineCSE.cpp @@ -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;