aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDevang Patel <dpatel@apple.com>2007-07-31 08:01:41 +0000
committerDevang Patel <dpatel@apple.com>2007-07-31 08:01:41 +0000
commit91d22c8b1ec2ad8f2f29804b729473ccf720fb3e (patch)
tree9ccc39f58c83e553485245870f254184e1b15d38
parentc7e49c08c22658dd16a5cac1500b0b70047bedc4 (diff)
downloadexternal_llvm-91d22c8b1ec2ad8f2f29804b729473ccf720fb3e.zip
external_llvm-91d22c8b1ec2ad8f2f29804b729473ccf720fb3e.tar.gz
external_llvm-91d22c8b1ec2ad8f2f29804b729473ccf720fb3e.tar.bz2
Implement Simple Analysis interfaces - cloneBasicBlockAnalysis and deleteAnalysisValue.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@40626 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/Transforms/Scalar/LICM.cpp26
1 files changed, 26 insertions, 0 deletions
diff --git a/lib/Transforms/Scalar/LICM.cpp b/lib/Transforms/Scalar/LICM.cpp
index a4aa12a..669afa3 100644
--- a/lib/Transforms/Scalar/LICM.cpp
+++ b/lib/Transforms/Scalar/LICM.cpp
@@ -102,6 +102,13 @@ namespace {
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 @@ void LICM::FindPromotableValuesInLoop(
}
}
}
+
+/// 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);
+}