xref: /freebsd/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/LoopAccessAnalysisPrinter.h (revision 700637cbb5e582861067a11aaca4d053546871d2)
1 //===- llvm/Analysis/LoopAccessAnalysisPrinter.h ----------------*- C++ -*-===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
8 
9 #ifndef LLVM_TRANSFORMS_SCALAR_LOOPACCESSANALYSISPRINTER_H
10 #define LLVM_TRANSFORMS_SCALAR_LOOPACCESSANALYSISPRINTER_H
11 #include "llvm/Analysis/LoopAnalysisManager.h"
12 #include "llvm/IR/PassManager.h"
13 
14 namespace llvm {
15 
16 class Function;
17 class raw_ostream;
18 
19 /// Printer pass for the \c LoopAccessInfo results.
20 class LoopAccessInfoPrinterPass
21     : public PassInfoMixin<LoopAccessInfoPrinterPass> {
22   raw_ostream &OS;
23   bool AllowPartial;
24 
25 public:
LoopAccessInfoPrinterPass(raw_ostream & OS,bool AllowPartial)26   explicit LoopAccessInfoPrinterPass(raw_ostream &OS, bool AllowPartial)
27       : OS(OS), AllowPartial(AllowPartial) {}
28   PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
isRequired()29   static bool isRequired() { return true; }
30 };
31 
32 } // End llvm namespace
33 
34 #endif
35