[llvm-commits] CVS: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp
Chris Lattner
lattner at cs.uiuc.edu
Thu Mar 17 11:56:35 PST 2005
Changes in directory llvm/lib/Analysis/DataStructure:
DataStructureAA.cpp updated: 1.23 -> 1.24
---
Log message:
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)
---
Diffs of the changes: (+3 -3)
DataStructureAA.cpp | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
Index: llvm/lib/Analysis/DataStructure/DataStructureAA.cpp
diff -u llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.23 llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.24
--- llvm/lib/Analysis/DataStructure/DataStructureAA.cpp:1.23 Mon Jan 24 14:00:14 2005
+++ llvm/lib/Analysis/DataStructure/DataStructureAA.cpp Thu Mar 17 13:56:18 2005
@@ -174,13 +174,13 @@
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);
More information about the llvm-commits
mailing list