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 24 public: 25 explicit LoopAccessInfoPrinterPass(raw_ostream &OS) : OS(OS) {} 26 PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM); 27 static bool isRequired() { return true; } 28 }; 29 30 } // End llvm namespace 31 32 #endif 33