summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-15 06:28:07 +0000
committerChris Lattner <sabre@nondot.org>2004-03-15 06:28:07 +0000
commit7f04ebc85863157ea0b49f19b73641d4ae91da5f (patch)
tree1310fcdf61e8448f94a9b534791c63861064addc /llvm/lib
parentf5c8f4cea60a0a2ad8604f777efdfb4954339461 (diff)
downloadbcm5719-llvm-7f04ebc85863157ea0b49f19b73641d4ae91da5f.tar.gz
bcm5719-llvm-7f04ebc85863157ea0b49f19b73641d4ae91da5f.zip
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. llvm-svn: 12422
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Analysis/AliasSetTracker.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/AliasSetTracker.cpp b/llvm/lib/Analysis/AliasSetTracker.cpp
index 450ba935bc0..0fb419266ce 100644
--- a/llvm/lib/Analysis/AliasSetTracker.cpp
+++ b/llvm/lib/Analysis/AliasSetTracker.cpp
@@ -117,6 +117,8 @@ void AliasSet::addCallSite(CallSite CS, AliasAnalysis &AA) {
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(StoreInst *SI) {
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());
OpenPOWER on IntegriCloud