diff options
author | Dan Gohman <gohman@apple.com> | 2009-12-18 01:24:09 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-12-18 01:24:09 +0000 |
commit | 92329c7fbe572892c17aa2d2542a10e3ea16132f (patch) | |
tree | ce133aeb6883b2cb097896877b881cbb1340287a /lib/CodeGen | |
parent | 3ca735450db584068f07b728f0537c3e9208a699 (diff) | |
download | external_llvm-92329c7fbe572892c17aa2d2542a10e3ea16132f.zip external_llvm-92329c7fbe572892c17aa2d2542a10e3ea16132f.tar.gz external_llvm-92329c7fbe572892c17aa2d2542a10e3ea16132f.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.cpp | 2 |
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; } |