mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-29 10:25:12 +00:00
llvm.memc* improvements. helps PA a lot in some specmarks
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27811 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -553,14 +553,21 @@ void GraphBuilder::visitCallSite(CallSite CS) {
|
|||||||
// targets pointers alias, but rather merge the out edges of the graphs
|
// targets pointers alias, but rather merge the out edges of the graphs
|
||||||
// for the pointers according to the type merging 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.
|
//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.
|
//I might be wrong though.
|
||||||
|
|
||||||
// Merge the first & second arguments, and mark the memory read and
|
// Merge the first & second arguments, and mark the memory read and
|
||||||
// modified.
|
// modified. Preserve second graph
|
||||||
DSNodeHandle RetNH = getValueDest(**CS.arg_begin());
|
DSNodeHandle RetNH = getValueDest(**CS.arg_begin());
|
||||||
RetNH.mergeWith(getValueDest(**(CS.arg_begin()+1)));
|
DSNodeHandle SrcNH = getValueDest(**(CS.arg_begin()+1));
|
||||||
|
DSNodeHandle Copy( new DSNode(*SrcNH.getNode(), SrcNH.getNode()->getParentGraph()),
|
||||||
|
SrcNH.getOffset());
|
||||||
|
RetNH.mergeWith(Copy);
|
||||||
if (DSNode *N = RetNH.getNode())
|
if (DSNode *N = RetNH.getNode())
|
||||||
N->setModifiedMarker()->setReadMarker();
|
N->setModifiedMarker();
|
||||||
|
if (DSNode *N = SrcNH.getNode())
|
||||||
|
N->setReadMarker();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
case Intrinsic::memset_i32:
|
case Intrinsic::memset_i32:
|
||||||
|
Reference in New Issue
Block a user