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
19namespace llvm {
20class LPMUpdater;
21class Loop;
22
23/// A simple loop rotation transformation.
24class LoopRotatePass : public PassInfoMixin<LoopRotatePass> {
25public:
26 LoopRotatePass(bool EnableHeaderDuplication = 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
34private:
35 const bool EnableHeaderDuplication;
36 const bool PrepareForLTO;
37};
38}
39
40#endif // LLVM_TRANSFORMS_SCALAR_LOOPROTATION_H
41

source code of llvm/include/llvm/Transforms/Scalar/LoopRotation.h