1 //===- ForwardOpTree.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 // Move instructions between statements. 10 // 11 //===----------------------------------------------------------------------===// 12 13 #ifndef POLLY_FORWARDOPTREE_H 14 #define POLLY_FORWARDOPTREE_H 15 16 #include "polly/ScopPass.h" 17 18 namespace llvm { 19 class PassRegistry; 20 } // namespace llvm 21 22 namespace polly { 23 llvm::Pass *createForwardOpTreeWrapperPass(); 24 llvm::Pass *createForwardOpTreePrinterLegacyPass(llvm::raw_ostream &OS); 25 26 struct ForwardOpTreePass final : llvm::PassInfoMixin<ForwardOpTreePass> { ForwardOpTreePassfinal27 ForwardOpTreePass() {} 28 29 llvm::PreservedAnalyses run(Scop &S, ScopAnalysisManager &SAM, 30 ScopStandardAnalysisResults &SAR, SPMUpdater &U); 31 }; 32 33 struct ForwardOpTreePrinterPass final 34 : llvm::PassInfoMixin<ForwardOpTreePrinterPass> { ForwardOpTreePrinterPassfinal35 ForwardOpTreePrinterPass(raw_ostream &OS) : OS(OS) {} 36 37 PreservedAnalyses run(Scop &S, ScopAnalysisManager &, 38 ScopStandardAnalysisResults &SAR, SPMUpdater &); 39 40 private: 41 llvm::raw_ostream &OS; 42 }; 43 44 } // namespace polly 45 46 namespace llvm { 47 void initializeForwardOpTreeWrapperPassPass(PassRegistry &); 48 void initializeForwardOpTreePrinterLegacyPassPass(PassRegistry &); 49 } // namespace llvm 50 51 #endif // POLLY_FORWARDOPTREE_H 52