mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-27 00:21:03 +00:00
Enhance LICM to promote alias sets whose pointers themselves are stored,
which doesn't affect the memory address being promoted. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122172 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -691,7 +691,10 @@ void LICM::PromoteAliasSet(AliasSet &AS) {
|
||||
if (isa<LoadInst>(Use))
|
||||
assert(!cast<LoadInst>(Use)->isVolatile() && "AST broken");
|
||||
else if (isa<StoreInst>(Use)) {
|
||||
if (Use->getOperand(0) == ASIV) return;
|
||||
// Stores *of* the pointer are not interesting, only stores *to* the
|
||||
// pointer.
|
||||
if (Use->getOperand(1) != ASIV)
|
||||
continue;
|
||||
assert(!cast<StoreInst>(Use)->isVolatile() && "AST broken");
|
||||
} else
|
||||
return; // Not a load or store.
|
||||
|
Reference in New Issue
Block a user