From ea7e6548dce9d03bd4efd3deb842f4f19256a8fd Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 17 Mar 2005 19:56:18 +0000 Subject: 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) llvm-svn: 20659 --- llvm/lib/Analysis/DataStructure/DataStructureAA.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'llvm/lib/Analysis/DataStructure/DataStructureAA.cpp') diff --git a/llvm/lib/Analysis/DataStructure/DataStructureAA.cpp b/llvm/lib/Analysis/DataStructure/DataStructureAA.cpp index 62eb663..74fdb1f 100644 --- a/llvm/lib/Analysis/DataStructure/DataStructureAA.cpp +++ b/llvm/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); -- cgit v1.1