aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/lib/Analysis/Delinearization.cpp
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:30 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:30 +0300
commit2598ef1d0aee359b4b6d5fdd1758916d5907d04f (patch)
tree012bb94d777798f1f56ac1cec429509766d05181 /contrib/libs/llvm12/lib/Analysis/Delinearization.cpp
parent6751af0b0c1b952fede40b19b71da8025b5d8bcf (diff)
downloadydb-2598ef1d0aee359b4b6d5fdd1758916d5907d04f.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/llvm12/lib/Analysis/Delinearization.cpp')
-rw-r--r--contrib/libs/llvm12/lib/Analysis/Delinearization.cpp64
1 files changed, 32 insertions, 32 deletions
diff --git a/contrib/libs/llvm12/lib/Analysis/Delinearization.cpp b/contrib/libs/llvm12/lib/Analysis/Delinearization.cpp
index 87a41bbf16..50adf84cca 100644
--- a/contrib/libs/llvm12/lib/Analysis/Delinearization.cpp
+++ b/contrib/libs/llvm12/lib/Analysis/Delinearization.cpp
@@ -13,7 +13,7 @@
//
//===----------------------------------------------------------------------===//
-#include "llvm/Analysis/Delinearization.h"
+#include "llvm/Analysis/Delinearization.h"
#include "llvm/Analysis/LoopInfo.h"
#include "llvm/Analysis/Passes.h"
#include "llvm/Analysis/ScalarEvolution.h"
@@ -24,7 +24,7 @@
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/LLVMContext.h"
-#include "llvm/IR/PassManager.h"
+#include "llvm/IR/PassManager.h"
#include "llvm/IR/Type.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
@@ -56,8 +56,8 @@ public:
void print(raw_ostream &O, const Module *M = nullptr) const override;
};
-void printDelinearization(raw_ostream &O, Function *F, LoopInfo *LI,
- ScalarEvolution *SE) {
+void printDelinearization(raw_ostream &O, Function *F, LoopInfo *LI,
+ ScalarEvolution *SE) {
O << "Delinearization on function " << F->getName() << ":\n";
for (inst_iterator I = inst_begin(F), E = inst_end(F); I != E; ++I) {
Instruction *Inst = &(*I);
@@ -108,25 +108,25 @@ void printDelinearization(raw_ostream &O, Function *F, LoopInfo *LI,
}
}
-} // end anonymous namespace
-
-void Delinearization::getAnalysisUsage(AnalysisUsage &AU) const {
- AU.setPreservesAll();
- AU.addRequired<LoopInfoWrapperPass>();
- AU.addRequired<ScalarEvolutionWrapperPass>();
-}
-
-bool Delinearization::runOnFunction(Function &F) {
- this->F = &F;
- SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
- LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
- return false;
-}
-
-void Delinearization::print(raw_ostream &O, const Module *) const {
- printDelinearization(O, F, LI, SE);
-}
-
+} // end anonymous namespace
+
+void Delinearization::getAnalysisUsage(AnalysisUsage &AU) const {
+ AU.setPreservesAll();
+ AU.addRequired<LoopInfoWrapperPass>();
+ AU.addRequired<ScalarEvolutionWrapperPass>();
+}
+
+bool Delinearization::runOnFunction(Function &F) {
+ this->F = &F;
+ SE = &getAnalysis<ScalarEvolutionWrapperPass>().getSE();
+ LI = &getAnalysis<LoopInfoWrapperPass>().getLoopInfo();
+ return false;
+}
+
+void Delinearization::print(raw_ostream &O, const Module *) const {
+ printDelinearization(O, F, LI, SE);
+}
+
char Delinearization::ID = 0;
static const char delinearization_name[] = "Delinearization";
INITIALIZE_PASS_BEGIN(Delinearization, DL_NAME, delinearization_name, true,
@@ -135,12 +135,12 @@ INITIALIZE_PASS_DEPENDENCY(LoopInfoWrapperPass)
INITIALIZE_PASS_END(Delinearization, DL_NAME, delinearization_name, true, true)
FunctionPass *llvm::createDelinearizationPass() { return new Delinearization; }
-
-DelinearizationPrinterPass::DelinearizationPrinterPass(raw_ostream &OS)
- : OS(OS) {}
-PreservedAnalyses DelinearizationPrinterPass::run(Function &F,
- FunctionAnalysisManager &AM) {
- printDelinearization(OS, &F, &AM.getResult<LoopAnalysis>(F),
- &AM.getResult<ScalarEvolutionAnalysis>(F));
- return PreservedAnalyses::all();
-}
+
+DelinearizationPrinterPass::DelinearizationPrinterPass(raw_ostream &OS)
+ : OS(OS) {}
+PreservedAnalyses DelinearizationPrinterPass::run(Function &F,
+ FunctionAnalysisManager &AM) {
+ printDelinearization(OS, &F, &AM.getResult<LoopAnalysis>(F),
+ &AM.getResult<ScalarEvolutionAnalysis>(F));
+ return PreservedAnalyses::all();
+}