diff options
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r-- | llvm/lib/Transforms/Scalar/LICM.cpp | 6 | ||||
-rw-r--r-- | llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/Scalar/LICM.cpp b/llvm/lib/Transforms/Scalar/LICM.cpp index 601d49fc03f..9bf75a4ffbf 100644 --- a/llvm/lib/Transforms/Scalar/LICM.cpp +++ b/llvm/lib/Transforms/Scalar/LICM.cpp @@ -1116,7 +1116,7 @@ static void hoist(Instruction &I, const DominatorTree *DT, const Loop *CurLoop, // The check on hasMetadataOtherThanDebugLoc is to prevent us from burning // time in isGuaranteedToExecute if we don't actually have anything to // drop. It is a compile time optimization, not required for correctness. - !isGuaranteedToExecute(I, DT, CurLoop, SafetyInfo)) + !SafetyInfo->isGuaranteedToExecute(I, DT, CurLoop)) I.dropUnknownNonDebugMetadata(); // Move the new node to the Preheader, before its terminator. @@ -1150,7 +1150,7 @@ static bool isSafeToExecuteUnconditionally(Instruction &Inst, return true; bool GuaranteedToExecute = - isGuaranteedToExecute(Inst, DT, CurLoop, SafetyInfo); + SafetyInfo->isGuaranteedToExecute(Inst, DT, CurLoop); if (!GuaranteedToExecute) { auto *LI = dyn_cast<LoadInst>(&Inst); @@ -1408,7 +1408,7 @@ bool llvm::promoteLoopAccessesToScalars( if (!DereferenceableInPH || !SafeToInsertStore || (InstAlignment > Alignment)) { - if (isGuaranteedToExecute(*UI, DT, CurLoop, SafetyInfo)) { + if (SafetyInfo->isGuaranteedToExecute(*UI, DT, CurLoop)) { DereferenceableInPH = true; SafeToInsertStore = true; Alignment = std::max(Alignment, InstAlignment); diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index 13e6bd13754..cd49f51283f 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -721,7 +721,7 @@ bool LoopUnswitch::processCurrentLoop() { // This is a workaround for the discrepancy between LLVM IR and MSan // semantics. See PR28054 for more details. if (SanitizeMemory && - !isGuaranteedToExecute(*TI, DT, currentLoop, &SafetyInfo)) + !SafetyInfo.isGuaranteedToExecute(*TI, DT, currentLoop)) continue; if (BranchInst *BI = dyn_cast<BranchInst>(TI)) { |