diff options
author | Andrew Lenharth <andrewl@lenharth.org> | 2006-04-18 22:36:11 +0000 |
---|---|---|
committer | Andrew Lenharth <andrewl@lenharth.org> | 2006-04-18 22:36:11 +0000 |
commit | 1c212dec249ddea75b721ad32634031cb9ef5dcb (patch) | |
tree | 9f8a76da2e03a984757c7d7e4d96f3702909bd74 /lib/Analysis/DataStructure | |
parent | f0d4e3d7c0c4cceaf5667846637f8f4bfd72e0c5 (diff) |
I understand now. Shoot.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27819 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/DataStructure')
-rw-r--r-- | lib/Analysis/DataStructure/Local.cpp | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/lib/Analysis/DataStructure/Local.cpp b/lib/Analysis/DataStructure/Local.cpp index a63edaa777..e4de3cb732 100644 --- a/lib/Analysis/DataStructure/Local.cpp +++ b/lib/Analysis/DataStructure/Local.cpp @@ -549,30 +549,12 @@ void GraphBuilder::visitCallSite(CallSite CS) { case Intrinsic::memcpy_i64: case Intrinsic::memmove_i32: case Intrinsic::memmove_i64: { - //This is over aggressive. What these functions do is not make the - // targets pointers alias, but rather merge the out edges of the graphs - // for the pointers according to the type merging of the graphs. - //Simply merging the two graphs is a crude approximation to this. - //Instead, copy the src pointer graph, then merge the copy with the - //dest pointer, thus avoiding contaminating the src with info from the dest - //I might be wrong though. - // Merge the first & second arguments, and mark the memory read and - // modified. Preserve second graph + // modified. DSNodeHandle RetNH = getValueDest(**CS.arg_begin()); - DSNodeHandle SrcNH = getValueDest(**(CS.arg_begin()+1)); - //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); + RetNH.mergeWith(getValueDest(**(CS.arg_begin()+1))); if (DSNode *N = RetNH.getNode()) - N->setModifiedMarker(); - if (DSNode *N = SrcNH.getNode()) - N->setReadMarker(); + N->setModifiedMarker()->setReadMarker(); return; } case Intrinsic::memset_i32: |