[llvm-commits] CVS: llvm/lib/Analysis/AliasSetTracker.cpp
Chris Lattner
lattner at cs.uiuc.edu
Mon Mar 15 00:29:01 PST 2004
Changes in directory llvm/lib/Analysis:
AliasSetTracker.cpp updated: 1.12 -> 1.13
---
Log message:
Ok, the assertion was bogus. Calls that do not read/write memory should not
have an alias set, just like adds and subtracts don't.
---
Diffs of the changes: (+6 -0)
Index: llvm/lib/Analysis/AliasSetTracker.cpp
diff -u llvm/lib/Analysis/AliasSetTracker.cpp:1.12 llvm/lib/Analysis/AliasSetTracker.cpp:1.13
--- llvm/lib/Analysis/AliasSetTracker.cpp:1.12 Mon Mar 15 00:24:15 2004
+++ llvm/lib/Analysis/AliasSetTracker.cpp Mon Mar 15 00:28:07 2004
@@ -117,6 +117,8 @@
bool AliasSet::aliasesPointer(const Value *Ptr, unsigned Size,
AliasAnalysis &AA) const {
if (AliasTy == MustAlias) {
+ assert(CallSites.empty() && "Illegal must alias set!");
+
// If this is a set of MustAliases, only check to see if the pointer aliases
// SOME value in the set...
HashNodePair *SomePtr = getSomePointer();
@@ -222,6 +224,10 @@
void AliasSetTracker::add(CallSite CS) {
+ if (Function *F = CS.getCalledFunction())
+ if (AA.doesNotAccessMemory(F))
+ return;
+
AliasSet *AS = findAliasSetForCallSite(CS);
if (!AS) {
AliasSets.push_back(AliasSet());
More information about the llvm-commits
mailing list