summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/LoopInfo.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-07-15 01:25:43 +0000
committerDan Gohman <gohman@apple.com>2009-07-15 01:25:43 +0000
commitbdc017edacb713119b24ab269d250a82d62fffeb (patch)
tree7cf92dc3dd53533075ad262c08ec0d23e0dd7e1d /include/llvm/Analysis/LoopInfo.h
parent2e2ad51ffd1e0822c7dc128d96113874017ad079 (diff)
downloadllvm-bdc017edacb713119b24ab269d250a82d62fffeb.tar.gz
llvm-bdc017edacb713119b24ab269d250a82d62fffeb.tar.bz2
llvm-bdc017edacb713119b24ab269d250a82d62fffeb.tar.xz
Make makeLoopInvariant report whether it made any changes or not,
and use this to simplify more code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75722 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/LoopInfo.h')
-rw-r--r--include/llvm/Analysis/LoopInfo.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h
index 90afc01da0..de9a30d281 100644
--- a/include/llvm/Analysis/LoopInfo.h
+++ b/include/llvm/Analysis/LoopInfo.h
@@ -490,7 +490,8 @@ public:
/// If InsertPt is specified, it is the point to hoist instructions to.
/// If null, the terminator of the loop preheader is used.
///
- bool makeLoopInvariant(Value *V, Instruction *InsertPt = 0) const;
+ bool makeLoopInvariant(Value *V, bool &Changed,
+ Instruction *InsertPt = 0) const;
/// makeLoopInvariant - If the given instruction is inside of the
/// loop and it can be hoisted, do so to make it trivially loop-invariant.
@@ -501,7 +502,8 @@ public:
/// If InsertPt is specified, it is the point to hoist instructions to.
/// If null, the terminator of the loop preheader is used.
///
- bool makeLoopInvariant(Instruction *I, Instruction *InsertPt = 0) const;
+ bool makeLoopInvariant(Instruction *I, bool &Changed,
+ Instruction *InsertPt = 0) const;
/// getCanonicalInductionVariable - Check to see if the loop has a canonical
/// induction variable: an integer recurrence that starts at 0 and increments