diff options
author | shadchin <shadchin@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:44:30 +0300 |
commit | 2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch) | |
tree | 012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/lib/Analysis/RegionPass.cpp | |
parent | 6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff) | |
download | ydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz |
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/Analysis/RegionPass.cpp')
-rw-r--r-- | contrib/libs/llvm12/lib/Analysis/RegionPass.cpp | 66 |
1 files changed, 33 insertions, 33 deletions
diff --git a/contrib/libs/llvm12/lib/Analysis/RegionPass.cpp b/contrib/libs/llvm12/lib/Analysis/RegionPass.cpp index a73607dbef..82a9a1d5de 100644 --- a/contrib/libs/llvm12/lib/Analysis/RegionPass.cpp +++ b/contrib/libs/llvm12/lib/Analysis/RegionPass.cpp @@ -15,7 +15,7 @@ #include "llvm/Analysis/RegionPass.h" #include "llvm/IR/OptBisect.h" #include "llvm/IR/PassTimingInfo.h" -#include "llvm/IR/StructuralHash.h" +#include "llvm/IR/StructuralHash.h" #include "llvm/Support/Debug.h" #include "llvm/Support/Timer.h" #include "llvm/Support/raw_ostream.h" @@ -87,54 +87,54 @@ bool RGPassManager::runOnFunction(Function &F) { initializeAnalysisImpl(P); - bool LocalChanged = false; + bool LocalChanged = false; { PassManagerPrettyStackEntry X(P, *CurrentRegion->getEntry()); TimeRegion PassTimer(getPassTimer(P)); -#ifdef EXPENSIVE_CHECKS - uint64_t RefHash = StructuralHash(F); -#endif - LocalChanged = P->runOnRegion(CurrentRegion, *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 - - Changed |= LocalChanged; +#ifdef EXPENSIVE_CHECKS + uint64_t RefHash = StructuralHash(F); +#endif + LocalChanged = P->runOnRegion(CurrentRegion, *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 + + Changed |= LocalChanged; } if (isPassDebuggingExecutionsOrMore()) { - if (LocalChanged) + if (LocalChanged) dumpPassInfo(P, MODIFICATION_MSG, ON_REGION_MSG, CurrentRegion->getNameStr()); dumpPreservedSet(P); } - // Manually check that this region is still healthy. This is done - // instead of relying on RegionInfo::verifyRegion since RegionInfo - // is a function pass and it's really expensive to verify every - // Region in the function every time. That level of checking can be - // enabled with the -verify-region-info option. - { - TimeRegion PassTimer(getPassTimer(P)); - CurrentRegion->verifyRegion(); + // Manually check that this region is still healthy. This is done + // instead of relying on RegionInfo::verifyRegion since RegionInfo + // is a function pass and it's really expensive to verify every + // Region in the function every time. That level of checking can be + // enabled with the -verify-region-info option. + { + TimeRegion PassTimer(getPassTimer(P)); + CurrentRegion->verifyRegion(); } - // Then call the regular verifyAnalysis functions. - verifyPreservedAnalysis(P); - - if (LocalChanged) - removeNotPreservedAnalysis(P); + // Then call the regular verifyAnalysis functions. + verifyPreservedAnalysis(P); + + if (LocalChanged) + removeNotPreservedAnalysis(P); recordAvailableAnalysis(P); removeDeadPasses(P, - (!isPassDebuggingExecutionsOrMore()) - ? "<deleted>" - : CurrentRegion->getNameStr(), + (!isPassDebuggingExecutionsOrMore()) + ? "<deleted>" + : CurrentRegion->getNameStr(), ON_REGION_MSG); } |