LLVM  7.0.0
LoopUnrollPass.h
Go to the documentation of this file.
1 //===- LoopUnrollPass.h -----------------------------------------*- C++ -*-===//
2 //
3 // The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLVM_TRANSFORMS_SCALAR_LOOPUNROLLPASS_H
11 #define LLVM_TRANSFORMS_SCALAR_LOOPUNROLLPASS_H
12 
14 #include "llvm/IR/PassManager.h"
15 
16 namespace llvm {
17 
18 class Function;
19 class Loop;
20 class LPMUpdater;
21 
22 /// Loop unroll pass that only does full loop unrolling.
23 class LoopFullUnrollPass : public PassInfoMixin<LoopFullUnrollPass> {
24  const int OptLevel;
25 
26 public:
27  explicit LoopFullUnrollPass(int OptLevel = 2) : OptLevel(OptLevel) {}
28 
31 };
32 
33 /// Loop unroll pass that will support both full and partial unrolling.
34 /// It is a function pass to have access to function and module analyses.
35 /// It will also put loops into canonical form (simplified and LCSSA).
36 class LoopUnrollPass : public PassInfoMixin<LoopUnrollPass> {
37  const int OptLevel;
38 
39 public:
40  /// This uses the target information (or flags) to control the thresholds for
41  /// different unrolling stategies but supports all of them.
42  explicit LoopUnrollPass(int OptLevel = 2) : OptLevel(OptLevel) {}
43 
45 };
46 
47 } // end namespace llvm
48 
49 #endif // LLVM_TRANSFORMS_SCALAR_LOOPUNROLLPASS_H
Compute iterated dominance frontiers using a linear time algorithm.
Definition: AllocatorList.h:24
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
F(f)
Loop unroll pass that only does full loop unrolling.
Loop unroll pass that will support both full and partial unrolling.
LoopFullUnrollPass(int OptLevel=2)
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:365
This header provides classes for managing per-loop analyses.
LoopUnrollPass(int OptLevel=2)
This uses the target information (or flags) to control the thresholds for different unrolling stategi...
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:153
PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U)
This class provides an interface for updating the loop pass manager based on mutations to the loop ne...
Represents a single loop in the control flow graph.
Definition: LoopInfo.h:459
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.