[llvm-commits] [llvm] r72122 - in /llvm/trunk: include/llvm/Analysis/ScalarEvolution.h lib/Analysis/ScalarEvolution.cpp
Dan Gohman
gohman at apple.com
Tue May 19 12:22:49 PDT 2009
Author: djg
Date: Tue May 19 14:22:47 2009
New Revision: 72122
URL: http://llvm.org/viewvc/llvm-project?rev=72122&view=rev
Log:
Make SCEVCallbackVH a private nested class inside ScalarEvolution, as
it's an implementation detail.
Modified:
llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
llvm/trunk/lib/Analysis/ScalarEvolution.cpp
Modified: llvm/trunk/include/llvm/Analysis/ScalarEvolution.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Analysis/ScalarEvolution.h?rev=72122&r1=72121&r2=72122&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Analysis/ScalarEvolution.h (original)
+++ llvm/trunk/include/llvm/Analysis/ScalarEvolution.h Tue May 19 14:22:47 2009
@@ -145,16 +145,6 @@
static bool classof(const SCEV *S);
};
- /// SCEVCallbackVH - A CallbackVH to arrange for ScalarEvolution to be
- /// notified whenever a Value is deleted.
- class SCEVCallbackVH : public CallbackVH {
- ScalarEvolution *SE;
- virtual void deleted();
- virtual void allUsesReplacedWith(Value *New);
- public:
- SCEVCallbackVH(Value *V, ScalarEvolution *SE = 0);
- };
-
/// SCEVHandle - This class is used to maintain the SCEV object's refcounts,
/// freeing the objects when the last reference is dropped.
class SCEVHandle {
@@ -212,6 +202,16 @@
/// they must ask this class for services.
///
class ScalarEvolution : public FunctionPass {
+ /// SCEVCallbackVH - A CallbackVH to arrange for ScalarEvolution to be
+ /// notified whenever a Value is deleted.
+ class SCEVCallbackVH : public CallbackVH {
+ ScalarEvolution *SE;
+ virtual void deleted();
+ virtual void allUsesReplacedWith(Value *New);
+ public:
+ SCEVCallbackVH(Value *V, ScalarEvolution *SE = 0);
+ };
+
friend class SCEVCallbackVH;
friend class SCEVExpander;
Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=72122&r1=72121&r2=72122&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Tue May 19 14:22:47 2009
@@ -3674,7 +3674,7 @@
// SCEVCallbackVH Class Implementation
//===----------------------------------------------------------------------===//
-void SCEVCallbackVH::deleted() {
+void ScalarEvolution::SCEVCallbackVH::deleted() {
assert(SE && "SCEVCallbackVH called with a non-null ScalarEvolution!");
if (PHINode *PN = dyn_cast<PHINode>(getValPtr()))
SE->ConstantEvolutionLoopExitValue.erase(PN);
@@ -3684,7 +3684,7 @@
// this now dangles!
}
-void SCEVCallbackVH::allUsesReplacedWith(Value *) {
+void ScalarEvolution::SCEVCallbackVH::allUsesReplacedWith(Value *) {
assert(SE && "SCEVCallbackVH called with a non-null ScalarEvolution!");
// Forget all the expressions associated with users of the old value,
@@ -3724,7 +3724,7 @@
// this may dangle!
}
-SCEVCallbackVH::SCEVCallbackVH(Value *V, ScalarEvolution *se)
+ScalarEvolution::SCEVCallbackVH::SCEVCallbackVH(Value *V, ScalarEvolution *se)
: CallbackVH(V), SE(se) {}
//===----------------------------------------------------------------------===//
More information about the llvm-commits
mailing list