aboutsummaryrefslogtreecommitdiff
path: root/lib/Analysis/DataStructure
diff options
context:
space:
mode:
authorAndrew Lenharth <andrewl@lenharth.org>2006-04-18 20:59:52 +0000
committerAndrew Lenharth <andrewl@lenharth.org>2006-04-18 20:59:52 +0000
commita544266db7d02d0f7251c09dbc02977eb666a1b0 (patch)
tree89da0e2eff2f8a0683c89097d142aa6b5b6cf379 /lib/Analysis/DataStructure
parent2dbf23afb409fea7b09081ac115fe495259a843d (diff)
llvm.memc* improvements. helps PA a lot in some specmarks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27812 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r--lib/Analysis/DataStructure/Local.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp
index 9afc9661a6..a63edaa777 100644
--- a/lib/Analysis/DataStructure/Local.cpp
+++ b/lib/Analysis/DataStructure/Local.cpp
@@ -561,8 +561,13 @@ void GraphBuilder::visitCallSite(CallSite CS) {
// modified. Preserve second graph
DSNodeHandle RetNH = getValueDest(**CS.arg_begin());
DSNodeHandle SrcNH = getValueDest(**(CS.arg_begin()+1));
- DSNodeHandle Copy( new DSNode(*SrcNH.getNode(), SrcNH.getNode()->getParentGraph()),
- SrcNH.getOffset());
+ //copy dsnode
+ DSNode* copy = new DSNode(*SrcNH.getNode(), SrcNH.getNode()->getParentGraph());
+ //since this is the target memory, we only are interested in the links.
+ //the target will not wind up with a global memory object , unless it
+ //was already there (only pointers to global memory objects)
+ copy->clearGlobals();
+ DSNodeHandle Copy( copy, SrcNH.getOffset());
RetNH.mergeWith(Copy);
if (DSNode *N = RetNH.getNode())
N->setModifiedMarker();