mirror of
https://github.com/RPCSX/llvm.git
synced 2024-11-29 14:40:25 +00:00
Two changes:
1. Chain to the parent implementation of M/R analysis if we can't find any information. It has some heuristics that often do well. 2. Do not clear all flags, this can make invalid nodes by turning nodes that used to be collapsed into non-collapsed nodes (fixing crashes) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20659 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
817aed4fab
commit
2e2cce69bc
@ -174,13 +174,13 @@ AliasAnalysis::AliasResult DSAA::alias(const Value *V1, unsigned V1Size,
|
|||||||
AliasAnalysis::ModRefResult
|
AliasAnalysis::ModRefResult
|
||||||
DSAA::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
|
DSAA::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
|
||||||
Function *F = CS.getCalledFunction();
|
Function *F = CS.getCalledFunction();
|
||||||
if (!F) return pointsToConstantMemory(P) ? Ref : ModRef;
|
if (!F || F->isExternal())
|
||||||
if (F->isExternal()) return ModRef;
|
return AliasAnalysis::getModRefInfo(CS, P, Size);
|
||||||
|
|
||||||
// Clone the function TD graph, clearing off Mod/Ref flags
|
// Clone the function TD graph, clearing off Mod/Ref flags
|
||||||
const Function *csParent = CS.getInstruction()->getParent()->getParent();
|
const Function *csParent = CS.getInstruction()->getParent()->getParent();
|
||||||
DSGraph TDGraph(TD->getDSGraph(*csParent));
|
DSGraph TDGraph(TD->getDSGraph(*csParent));
|
||||||
TDGraph.maskNodeTypes(0);
|
TDGraph.maskNodeTypes(~(DSNode::Modified|DSNode::Read));
|
||||||
|
|
||||||
// Insert the callee's BU graph into the TD graph
|
// Insert the callee's BU graph into the TD graph
|
||||||
const DSGraph &BUGraph = BU->getDSGraph(*F);
|
const DSGraph &BUGraph = BU->getDSGraph(*F);
|
||||||
|
Loading…
Reference in New Issue
Block a user