diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:39 +0300 |
commit | e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch) | |
tree | 64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/lib/Analysis/LoopPass.cpp | |
parent | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff) | |
download | ydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/Analysis/LoopPass.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/Analysis/LoopPass.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/contrib/libs/llvm12/lib/Analysis/LoopPass.cpp b/contrib/libs/llvm12/lib/Analysis/LoopPass.cpp index e7e7a4dd52..9e470e998e 100644 --- a/contrib/libs/llvm12/lib/Analysis/LoopPass.cpp +++ b/contrib/libs/llvm12/lib/Analysis/LoopPass.cpp @@ -19,8 +19,8 @@ #include "llvm/IR/OptBisect.h" #include "llvm/IR/PassManager.h" #include "llvm/IR/PassTimingInfo.h" -#include "llvm/IR/PrintPasses.h" -#include "llvm/IR/StructuralHash.h" +#include "llvm/IR/PrintPasses.h" +#include "llvm/IR/StructuralHash.h" #include "llvm/InitializePasses.h" #include "llvm/Support/Debug.h" #include "llvm/Support/TimeProfiler.h" @@ -77,7 +77,7 @@ LPPassManager::LPPassManager() // Insert loop into loop nest (LoopInfo) and loop queue (LQ). void LPPassManager::addLoop(Loop &L) { - if (L.isOutermost()) { + if (L.isOutermost()) { // This is the top level loop. LQ.push_front(&L); return; @@ -117,7 +117,7 @@ void LPPassManager::markLoopAsDeleted(Loop &L) { // there. However, we have to be careful to not remove the back of the queue // as that is assumed to match the current loop. assert(LQ.back() == CurrentLoop && "Loop queue back isn't the current loop!"); - llvm::erase_value(LQ, &L); + llvm::erase_value(LQ, &L); if (&L == CurrentLoop) { CurrentLoopDeleted = true; @@ -192,19 +192,19 @@ bool LPPassManager::runOnFunction(Function &F) { { PassManagerPrettyStackEntry X(P, *CurrentLoop->getHeader()); TimeRegion PassTimer(getPassTimer(P)); -#ifdef EXPENSIVE_CHECKS - uint64_t RefHash = StructuralHash(F); -#endif +#ifdef EXPENSIVE_CHECKS + uint64_t RefHash = StructuralHash(F); +#endif LocalChanged = P->runOnLoop(CurrentLoop, *this); - -#ifdef EXPENSIVE_CHECKS - if (!LocalChanged && (RefHash != StructuralHash(F))) { - llvm::errs() << "Pass modifies its input and doesn't report it: " - << P->getPassName() << "\n"; - llvm_unreachable("Pass modifies its input and doesn't report it"); - } -#endif - + +#ifdef EXPENSIVE_CHECKS + if (!LocalChanged && (RefHash != StructuralHash(F))) { + llvm::errs() << "Pass modifies its input and doesn't report it: " + << P->getPassName() << "\n"; + llvm_unreachable("Pass modifies its input and doesn't report it"); + } +#endif + Changed |= LocalChanged; if (EmitICRemark) { unsigned NewSize = F.getInstructionCount(); @@ -254,8 +254,8 @@ bool LPPassManager::runOnFunction(Function &F) { F.getContext().yield(); } - if (LocalChanged) - removeNotPreservedAnalysis(P); + if (LocalChanged) + removeNotPreservedAnalysis(P); recordAvailableAnalysis(P); removeDeadPasses(P, CurrentLoopDeleted ? "<deleted>" |