summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/IVUsers.h
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2011-08-10 03:46:27 +0000
committerAndrew Trick <atrick@apple.com>2011-08-10 03:46:27 +0000
commit4b4bb71bcdfd8c17cd4acb6116fc9a56c5fecd47 (patch)
tree8451c2af58db59a8d6fec6bcccc79ff077753ad2 /include/llvm/Analysis/IVUsers.h
parent2d31ae3d9dfb153f081a5521374b2b42befd50a1 (diff)
downloadllvm-4b4bb71bcdfd8c17cd4acb6116fc9a56c5fecd47.tar.gz
llvm-4b4bb71bcdfd8c17cd4acb6116fc9a56c5fecd47.tar.bz2
llvm-4b4bb71bcdfd8c17cd4acb6116fc9a56c5fecd47.tar.xz
Added a SimplifyIndVar utility to simplify induction variable users
based on ScalarEvolution without changing the induction variable phis. This utility is the main tool of IndVarSimplifyPass, but the pass also restructures induction variables in strange ways that are sensitive to pass ordering. This provides a way for other loop passes to simplify new uses of induction variables created during transformation. The utility may be used by any pass that preserves ScalarEvolution. Soon LoopUnroll will use it. The net effect in this checkin is to cleanup the IndVarSimplify pass by factoring out the SimplifyIndVar algorithm into a standalone utility. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137197 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/IVUsers.h')
-rw-r--r--include/llvm/Analysis/IVUsers.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/llvm/Analysis/IVUsers.h b/include/llvm/Analysis/IVUsers.h
index e56d24d583..2fb607cc5c 100644
--- a/include/llvm/Analysis/IVUsers.h
+++ b/include/llvm/Analysis/IVUsers.h
@@ -140,6 +140,8 @@ public:
static char ID; // Pass ID, replacement for typeid
IVUsers();
+ Loop *getLoop() const { return L; }
+
/// AddUsersIfInteresting - Inspect the specified Instruction. If it is a
/// reducible SCEV, recursively add its users to the IVUsesByStride set and
/// return true. Otherwise, return false.