aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/MachineCSE.cpp
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2010-03-08 23:49:12 +0000
committerEvan Cheng <evan.cheng@apple.com>2010-03-08 23:49:12 +0000
commitf8de150bd306e91b4bf7e0962982239c31d13fe6 (patch)
tree8d54d75ff219461b1f0f977af2904a41f3073dfc /lib/CodeGen/MachineCSE.cpp
parent6df19429b0d16020cf10afa72dbedc4e8082f3ae (diff)
downloadexternal_llvm-f8de150bd306e91b4bf7e0962982239c31d13fe6.tar.gz
external_llvm-f8de150bd306e91b4bf7e0962982239c31d13fe6.tar.bz2
external_llvm-f8de150bd306e91b4bf7e0962982239c31d13fe6.zip
Don't waste time trying to CSE labels, phis, inline asm. Definitely avoid cse implicit-def for obvious performance reason.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98009 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineCSE.cpp')
-rw-r--r--lib/CodeGen/MachineCSE.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/CodeGen/MachineCSE.cpp b/lib/CodeGen/MachineCSE.cpp
index ce8ebbc601..a0023feb98 100644
--- a/lib/CodeGen/MachineCSE.cpp
+++ b/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;