mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-01 15:40:46 +00:00
Adjust to new interfaces
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18958 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0af024c5d0
commit
68a9d3eb38
@ -358,9 +358,10 @@ bool LICM::canSinkOrHoistInst(Instruction &I) {
|
||||
} else if (CallInst *CI = dyn_cast<CallInst>(&I)) {
|
||||
// Handle obvious cases efficiently.
|
||||
if (Function *Callee = CI->getCalledFunction()) {
|
||||
if (AA->doesNotAccessMemory(Callee))
|
||||
AliasAnalysis::ModRefBehavior Behavior =AA->getModRefBehavior(Callee, CI);
|
||||
if (Behavior == AliasAnalysis::DoesNotAccessMemory)
|
||||
return true;
|
||||
else if (AA->onlyReadsMemory(Callee)) {
|
||||
else if (Behavior == AliasAnalysis::OnlyReadsMemory) {
|
||||
// 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