mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-28 19:31:58 +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:
parent
40b6a19daa
commit
cd93f3bbb9
@ -124,7 +124,7 @@ void AliasSet::addCallSite(CallSite CS, AliasAnalysis &AA) {
|
|||||||
AliasAnalysis::ModRefBehavior Behavior = AA.getModRefBehavior(CS);
|
AliasAnalysis::ModRefBehavior Behavior = AA.getModRefBehavior(CS);
|
||||||
if (Behavior == AliasAnalysis::DoesNotAccessMemory)
|
if (Behavior == AliasAnalysis::DoesNotAccessMemory)
|
||||||
return;
|
return;
|
||||||
else if (Behavior == AliasAnalysis::OnlyReadsMemory) {
|
if (AliasAnalysis::onlyReadsMemory(Behavior)) {
|
||||||
AliasTy = MayAlias;
|
AliasTy = MayAlias;
|
||||||
AccessTy |= Refs;
|
AccessTy |= Refs;
|
||||||
return;
|
return;
|
||||||
|
@ -412,7 +412,7 @@ bool LICM::canSinkOrHoistInst(Instruction &I) {
|
|||||||
AliasAnalysis::ModRefBehavior Behavior = AA->getModRefBehavior(CI);
|
AliasAnalysis::ModRefBehavior Behavior = AA->getModRefBehavior(CI);
|
||||||
if (Behavior == AliasAnalysis::DoesNotAccessMemory)
|
if (Behavior == AliasAnalysis::DoesNotAccessMemory)
|
||||||
return true;
|
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
|
// 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.
|
// in the loop, we can hoist or sink the call as appropriate.
|
||||||
bool FoundMod = false;
|
bool FoundMod = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user