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 | 2d2303db2277c5c5373d3a98f81fdaa6eb5ad139 (patch) | |
tree | a1e7be341c755f55b8683b3451ba4830ca0bd6ac /llvm/lib/Analysis/DataStructure/TopDownClosure.cpp | |
parent | 0b5b78492254cc1446a68e980051ac06915e6a2d (diff) | |
download | bcm5719-llvm-2d2303db2277c5c5373d3a98f81fdaa6eb5ad139.tar.gz bcm5719-llvm-2d2303db2277c5c5373d3a98f81fdaa6eb5ad139.zip |
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.
llvm-svn: 4836
Diffstat (limited to 'llvm/lib/Analysis/DataStructure/TopDownClosure.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/TopDownClosure.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp b/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp index aa9a6a94c6c..da9bc7c1348 100644 --- a/llvm/lib/Analysis/DataStructure/TopDownClosure.cpp +++ b/llvm/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 |