[llvm-commits] [llvm] r40626 - /llvm/trunk/lib/Transforms/Scalar/LICM.cpp
Devang Patel
dpatel at apple.com
Tue Jul 31 01:01:41 PDT 2007
Author: dpatel
Date: Tue Jul 31 03:01:41 2007
New Revision: 40626
URL: http://llvm.org/viewvc/llvm-project?rev=40626&view=rev
Log:
Implement Simple Analysis interfaces - cloneBasicBlockAnalysis and deleteAnalysisValue.
Modified:
llvm/trunk/lib/Transforms/Scalar/LICM.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/LICM.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/LICM.cpp?rev=40626&r1=40625&r2=40626&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/LICM.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/LICM.cpp Tue Jul 31 03:01:41 2007
@@ -102,6 +102,13 @@
AliasSetTracker *CurAST; // AliasSet information for the current loop...
std::map<Loop *, AliasSetTracker *> LoopToAliasMap;
+ /// cloneBasicBlockAnalysis - Simple Analysis hook. Clone alias set info.
+ void cloneBasicBlockAnalysis(BasicBlock *From, BasicBlock *To, Loop *L);
+
+ /// deleteAnalysisValue - Simple Analysis hook. Delete value V from alias
+ /// set.
+ void deleteAnalysisValue(Value *V, Loop *L);
+
/// SinkRegion - Walk the specified region of the CFG (defined by all blocks
/// dominated by the specified block, and that are in the current loop) in
/// reverse depth first order w.r.t the DominatorTree. This allows us to
@@ -798,3 +805,22 @@
}
}
}
+
+/// cloneBasicBlockAnalysis - Simple Analysis hook. Clone alias set info.
+void LICM::cloneBasicBlockAnalysis(BasicBlock *From, BasicBlock *To, Loop *L) {
+ AliasSetTracker *AST = LoopToAliasMap[L];
+ if (!AST)
+ return;
+
+ AST->copyValue(From, To);
+}
+
+/// deleteAnalysisValue - Simple Analysis hook. Delete value V from alias
+/// set.
+void LICM::deleteAnalysisValue(Value *V, Loop *L) {
+ AliasSetTracker *AST = LoopToAliasMap[L];
+ if (!AST)
+ return;
+
+ AST->deleteValue(V);
+}
More information about the llvm-commits
mailing list