| 1 | //===- LoopRotation.h - Loop Rotation -------------------------------------===// |
| 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 | // This file provides the interface for the Loop Rotation pass. |
| 10 | // |
| 11 | //===----------------------------------------------------------------------===// |
| 12 | |
| 13 | #ifndef LLVM_TRANSFORMS_SCALAR_LOOPROTATION_H |
| 14 | #define LLVM_TRANSFORMS_SCALAR_LOOPROTATION_H |
| 15 | |
| 16 | #include "llvm/Analysis/LoopAnalysisManager.h" |
| 17 | #include "llvm/IR/PassManager.h" |
| 18 | |
| 19 | namespace llvm { |
| 20 | class LPMUpdater; |
| 21 | class Loop; |
| 22 | |
| 23 | /// A simple loop rotation transformation. |
| 24 | class LoopRotatePass : public PassInfoMixin<LoopRotatePass> { |
| 25 | public: |
| 26 | LoopRotatePass(bool = true, |
| 27 | bool PrepareForLTO = false); |
| 28 | PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, |
| 29 | LoopStandardAnalysisResults &AR, LPMUpdater &U); |
| 30 | |
| 31 | void printPipeline(raw_ostream &OS, |
| 32 | function_ref<StringRef(StringRef)> MapClassName2PassName); |
| 33 | |
| 34 | private: |
| 35 | const bool ; |
| 36 | const bool PrepareForLTO; |
| 37 | }; |
| 38 | } |
| 39 | |
| 40 | #endif // LLVM_TRANSFORMS_SCALAR_LOOPROTATION_H |
| 41 | |