From 18fa5686f6e06c60bcbfd20a6418c2e5bee8c856 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 18 Dec 2009 01:24:09 +0000 Subject: 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. llvm-svn: 91654 --- llvm/lib/Analysis/LoopInfo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/lib/Analysis/LoopInfo.cpp') diff --git a/llvm/lib/Analysis/LoopInfo.cpp b/llvm/lib/Analysis/LoopInfo.cpp index 34089ee59c4..5d31c1157e1 100644 --- a/llvm/lib/Analysis/LoopInfo.cpp +++ b/llvm/lib/Analysis/LoopInfo.cpp @@ -56,7 +56,7 @@ bool Loop::isLoopInvariant(Value *V) const { /// loop-invariant. /// bool Loop::isLoopInvariant(Instruction *I) const { - return !contains(I->getParent()); + return !contains(I); } /// makeLoopInvariant - If the given value is an instruciton inside of the -- cgit v1.2.3