llvm.memc* improvements. helps PA a lot in some specmarks
authorAndrew Lenharth <andrewl@lenharth.org>
Tue, 18 Apr 2006 20:59:52 +0000 (20:59 +0000)
committerAndrew Lenharth <andrewl@lenharth.org>
Tue, 18 Apr 2006 20:59:52 +0000 (20:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27812 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/DataStructure/Local.cpp

index 9afc9661a6351d043973992c082005d23dfbdd81..a63edaa77756151f9b8a62d8733f09fa277ea47c 100644 (file)
@@ -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();