aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-12-18 01:24:09 +0000
committerDan Gohman <gohman@apple.com>2009-12-18 01:24:09 +0000
commite8df7dd15480646d4fdf56105d23d17eaffaabb0 (patch)
treece133aeb6883b2cb097896877b881cbb1340287a /lib/CodeGen
parent957b3b8a697dd4a7655d7d6db576c631d9a21343 (diff)
downloadexternal_llvm-e8df7dd15480646d4fdf56105d23d17eaffaabb0.zip
external_llvm-e8df7dd15480646d4fdf56105d23d17eaffaabb0.tar.gz
external_llvm-e8df7dd15480646d4fdf56105d23d17eaffaabb0.tar.bz2
Add Loop contains utility methods for testing whether a loop
contains another loop, or an instruction. The loop form is substantially more efficient on large loops than the typical code it replaces. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91654 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen')
-rw-r--r--lib/CodeGen/MachineLICM.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/MachineLICM.cpp b/lib/CodeGen/MachineLICM.cpp
index 66de535..0a57ea1 100644
--- a/lib/CodeGen/MachineLICM.cpp
+++ b/lib/CodeGen/MachineLICM.cpp
@@ -322,7 +322,7 @@ bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) {
// If the loop contains the definition of an operand, then the instruction
// isn't loop invariant.
- if (CurLoop->contains(RegInfo->getVRegDef(Reg)->getParent()))
+ if (CurLoop->contains(RegInfo->getVRegDef(Reg)))
return false;
}