mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-28 22:55:52 +00:00
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12422 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
df209fcc7e
commit
fcead4f426
@ -117,6 +117,8 @@ void AliasSet::addCallSite(CallSite CS, AliasAnalysis &AA) {
|
|||||||
bool AliasSet::aliasesPointer(const Value *Ptr, unsigned Size,
|
bool AliasSet::aliasesPointer(const Value *Ptr, unsigned Size,
|
||||||
AliasAnalysis &AA) const {
|
AliasAnalysis &AA) const {
|
||||||
if (AliasTy == MustAlias) {
|
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
|
// If this is a set of MustAliases, only check to see if the pointer aliases
|
||||||
// SOME value in the set...
|
// SOME value in the set...
|
||||||
HashNodePair *SomePtr = getSomePointer();
|
HashNodePair *SomePtr = getSomePointer();
|
||||||
@ -222,6 +224,10 @@ void AliasSetTracker::add(StoreInst *SI) {
|
|||||||
|
|
||||||
|
|
||||||
void AliasSetTracker::add(CallSite CS) {
|
void AliasSetTracker::add(CallSite CS) {
|
||||||
|
if (Function *F = CS.getCalledFunction())
|
||||||
|
if (AA.doesNotAccessMemory(F))
|
||||||
|
return;
|
||||||
|
|
||||||
AliasSet *AS = findAliasSetForCallSite(CS);
|
AliasSet *AS = findAliasSetForCallSite(CS);
|
||||||
if (!AS) {
|
if (!AS) {
|
||||||
AliasSets.push_back(AliasSet());
|
AliasSets.push_back(AliasSet());
|
||||||
|
Loading…
Reference in New Issue
Block a user