mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-12-14 11:32:34 +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);
|
||||
if (Behavior == AliasAnalysis::DoesNotAccessMemory)
|
||||
return;
|
||||
else if (Behavior == AliasAnalysis::OnlyReadsMemory) {
|
||||
if (AliasAnalysis::onlyReadsMemory(Behavior)) {
|
||||
AliasTy = MayAlias;
|
||||
AccessTy |= Refs;
|
||||
return;
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user