[llvm-commits] Review Request: Use SmallPtrSetImpl instead of SmallPtrSet in funciton IVUsers::AddUsersIfInteresting
Hongbin Zheng
etherzhhb at gmail.com
Fri Mar 16 01:21:37 PDT 2012
hi,
This patch let the user to decide the default size of the SmallPtrSet
which is passed to IVUsers::AddUsersIfInteresting.
best regards
ether
[PATCH] Refactor: Use SmallPtrSetImpl instead of SmallPtrSet as the
argument type of funciton IVUsers::AddUsersIfInteresting,
let the user decide the default size.
---
include/llvm/Analysis/IVUsers.h | 2 +-
lib/Analysis/IVUsers.cpp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/include/llvm/Analysis/IVUsers.h b/include/llvm/Analysis/IVUsers.h
index 11d2cf0..59884de 100644
--- a/include/llvm/Analysis/IVUsers.h
+++ b/include/llvm/Analysis/IVUsers.h
@@ -146,7 +146,7 @@ public:
/// reducible SCEV, recursively add its users to the IVUsesByStride set and
/// return true. Otherwise, return false.
bool AddUsersIfInteresting(Instruction *I,
- SmallPtrSet<Loop*,16> &SimpleLoopNests);
+ SmallPtrSetImpl<Loop*> &SimpleLoopNests);
IVStrideUse &AddUser(Instruction *User, Value *Operand);
diff --git a/lib/Analysis/IVUsers.cpp b/lib/Analysis/IVUsers.cpp
index c598b72..df2bc1a 100644
--- a/lib/Analysis/IVUsers.cpp
+++ b/lib/Analysis/IVUsers.cpp
@@ -102,7 +102,7 @@ static bool isSimplifiedLoopNest(Loop *L, const
DominatorTree *DT,
/// reducible SCEV, recursively add its users to the IVUsesByStride set and
/// return true. Otherwise, return false.
bool IVUsers::AddUsersIfInteresting(Instruction *I,
- SmallPtrSet<Loop*,16> &SimpleLoopNests) {
+ SmallPtrSetImpl<Loop*> &SimpleLoopNests) {
// Add this IV user to the Processed set before returning false to
ensure that
// all IV users are members of the set. See IVUsers::isIVUserOrOperand.
if (!Processed.insert(I))
--
1.7.5.4
More information about the llvm-commits
mailing list