mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
Teach LICM and AliasSetTracker about AccessesArgumentsReadonly.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118618 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -412,7 +412,7 @@ bool LICM::canSinkOrHoistInst(Instruction &I) {
|
||||
AliasAnalysis::ModRefBehavior Behavior = AA->getModRefBehavior(CI);
|
||||
if (Behavior == AliasAnalysis::DoesNotAccessMemory)
|
||||
return true;
|
||||
else if (Behavior == AliasAnalysis::OnlyReadsMemory) {
|
||||
if (AliasAnalysis::onlyReadsMemory(Behavior)) {
|
||||
// If this call only reads from memory and there are no writes to memory
|
||||
// in the loop, we can hoist or sink the call as appropriate.
|
||||
bool FoundMod = false;
|
||||
|
Reference in New Issue
Block a user