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 EnableHeaderDuplication = true, 27 bool PrepareForLTO = false); 28 PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, 29 LoopStandardAnalysisResults &AR, LPMUpdater &U); 30 31 private: 32 const bool EnableHeaderDuplication; 33 const bool PrepareForLTO; 34 }; 35 } 36 37 #endif // LLVM_TRANSFORMS_SCALAR_LOOPROTATION_H 38