diff options
author | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-11-27 17:41:13 +0000 |
---|---|---|
committer | Vikram S. Adve <vadve@cs.uiuc.edu> | 2002-11-27 17:41:13 +0000 |
commit | 61ff02982f8e9be0df1ba9f658e1dad4f98839a7 (patch) | |
tree | 9e97581806724acfa113f89210534e2b2fe77398 /lib/Analysis/DataStructure/TopDownClosure.cpp | |
parent | e127a14991b5eefd021dd785697afb7f3f09e955 (diff) |
Fix logical error in TD pass: we should clear Mod/Ref bits of each caller
before inlining their graphs into a function. To support this,
added flags to CloneFlags to strip/keep Mod/Ref bits.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@4836 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure/TopDownClosure.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/TopDownClosure.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Analysis/DataStructure/TopDownClosure.cpp b/lib/Analysis/DataStructure/TopDownClosure.cpp index aa9a6a94c6..da9bc7c134 100644 --- a/lib/Analysis/DataStructure/TopDownClosure.cpp +++ b/lib/Analysis/DataStructure/TopDownClosure.cpp @@ -100,7 +100,7 @@ void TDDataStructures::calculateGraph(Function &F) { const std::vector<DSCallSite> &CallSites = Graph.getFunctionCalls(); if (CallSites.empty()) { DEBUG(std::cerr << " [TD] No callees for: " << F.getName() << "\n"); - return; // If no call sites, the graph is the same as the BU graph! + return; // If no call sites, there is nothing more to do here } // Loop over all of the call sites, building a multi-map from Callees to @@ -143,9 +143,10 @@ void TDDataStructures::calculateGraph(Function &F) { std::map<Value*, DSNodeHandle> OldValMap; std::map<const DSNode*, DSNodeHandle> OldNodeMap; CG.cloneInto(Graph, OldValMap, OldNodeMap, + DSGraph::StripModRefBits | DSGraph::KeepAllocaBit | DSGraph::DontCloneCallNodes); OldValMap.clear(); // We don't care about the ValMap - + // Loop over all of the invocation sites of the callee, resolving // arguments to our graph. This loop may iterate multiple times if the // current function calls this callee multiple times with different |