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/DataStructure.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/DataStructure.cpp')
-rw-r--r-- | lib/Analysis/DataStructure/DataStructure.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Analysis/DataStructure/DataStructure.cpp b/lib/Analysis/DataStructure/DataStructure.cpp index fe72bfe6d5..d26213fc48 100644 --- a/lib/Analysis/DataStructure/DataStructure.cpp +++ b/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(), |