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/DataStructure.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/DataStructure.cpp')
-rw-r--r-- | llvm/lib/Analysis/DataStructure/DataStructure.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/llvm/lib/Analysis/DataStructure/DataStructure.cpp b/llvm/lib/Analysis/DataStructure/DataStructure.cpp index fe72bfe6d52..d26213fc482 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructure.cpp +++ b/llvm/lib/Analysis/DataStructure/DataStructure.cpp @@ -598,9 +598,14 @@ DSNodeHandle DSGraph::cloneInto(const DSGraph &G, Nodes[i]->remapLinks(OldNodeMap); // Remove alloca markers as specified - if (CloneFlags & StripAllocaBit) + if (CloneFlags & (StripAllocaBit | StripModRefBits)) { + unsigned short clearBits = (CloneFlags & StripAllocaBit + ? DSNode::AllocaNode : 0) + | (CloneFlags & StripModRefBits + ? (DSNode::Modified | DSNode::Read) : 0); for (unsigned i = FN, e = Nodes.size(); i != e; ++i) - Nodes[i]->NodeType &= ~DSNode::AllocaNode; + Nodes[i]->NodeType &= ~clearBits; + } // Copy the value map... and merge all of the global nodes... for (std::map<Value*, DSNodeHandle>::const_iterator I = G.ScalarMap.begin(), |