Coverage Report

Created: 2017-10-03 07:32

/Users/buildslave/jenkins/sharedspace/clang-stage2-coverage-R@2/llvm/include/llvm/Transforms/Scalar/LoopUnrollPass.h
Line
Count
Source (jump to first uncovered line)
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
13
#include "llvm/Analysis/LoopInfo.h"
14
#include "llvm/IR/PassManager.h"
15
#include "llvm/Transforms/Scalar/LoopPassManager.h"
16
17
namespace llvm {
18
19
/// Loop unroll pass that only does full loop unrolling.
20
class LoopFullUnrollPass : public PassInfoMixin<LoopFullUnrollPass> {
21
  const int OptLevel;
22
23
public:
24
0
  explicit LoopFullUnrollPass(int OptLevel = 2) : OptLevel(OptLevel) {}
25
26
  PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM,
27
                        LoopStandardAnalysisResults &AR, LPMUpdater &U);
28
};
29
30
/// Loop unroll pass that will support both full and partial unrolling.
31
/// It is a function pass to have access to function and module analyses.
32
/// It will also put loops into canonical form (simplified and LCSSA).
33
class LoopUnrollPass : public PassInfoMixin<LoopUnrollPass> {
34
  const int OptLevel;
35
36
public:
37
  /// This uses the target information (or flags) to control the thresholds for
38
  /// different unrolling stategies but supports all of them.
39
0
  explicit LoopUnrollPass(int OptLevel = 2) : OptLevel(OptLevel) {}
40
41
  PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM);
42
};
43
} // end namespace llvm
44
45
#endif // LLVM_TRANSFORMS_SCALAR_LOOPUNROLLPASS_H