aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-03-17 19:56:18 +0000
committerChris Lattner <sabre@nondot.org>2005-03-17 19:56:18 +0000
commit2e2cce69bcd8f0ce55e147cefe21935c2d9355b1 (patch)
treeda4500826dc3804a3a2c2d48b417ac1fc1fd4c62
parent817aed4fab460c4e48fc632de513b0998eeb5a18 (diff)
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
-rw-r--r--lib/Analysis/DataStructure/DataStructureAA.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/Analysis/DataStructure/DataStructureAA.cpp b/lib/Analysis/DataStructure/DataStructureAA.cpp
index 62eb663990..74fdb1f590 100644
--- a/lib/Analysis/DataStructure/DataStructureAA.cpp
+++ b/lib/Analysis/DataStructure/DataStructureAA.cpp
@@ -174,13 +174,13 @@ AliasAnalysis::AliasResult DSAA::alias(const Value *V1, unsigned V1Size,
AliasAnalysis::ModRefResult
DSAA::getModRefInfo(CallSite CS, Value *P, unsigned Size) {
Function *F = CS.getCalledFunction();
- if (!F) return pointsToConstantMemory(P) ? Ref : ModRef;
- if (F->isExternal()) return ModRef;
+ if (!F || F->isExternal())
+ return AliasAnalysis::getModRefInfo(CS, P, Size);
// Clone the function TD graph, clearing off Mod/Ref flags
const Function *csParent = CS.getInstruction()->getParent()->getParent();
DSGraph TDGraph(TD->getDSGraph(*csParent));
- TDGraph.maskNodeTypes(0);
+ TDGraph.maskNodeTypes(~(DSNode::Modified|DSNode::Read));
// Insert the callee's BU graph into the TD graph
const DSGraph &BUGraph = BU->getDSGraph(*F);