]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/include/llvm/Transforms/Utils/LoopRotationUtils.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / include / llvm / Transforms / Utils / LoopRotationUtils.h
1 //===- LoopRotationUtils.h - Utilities to perform loop rotation -*- 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 // This file provides utilities to convert a loop into a loop with bottom test.
11 //
12 //===----------------------------------------------------------------------===//
13
14 #ifndef LLVM_TRANSFORMS_UTILS_LOOPROTATIONUTILS_H
15 #define LLVM_TRANSFORMS_UTILS_LOOPROTATIONUTILS_H
16
17 namespace llvm {
18
19 class AssumptionCache;
20 class DominatorTree;
21 class Loop;
22 class LoopInfo;
23 class MemorySSAUpdater;
24 class ScalarEvolution;
25 struct SimplifyQuery;
26 class TargetTransformInfo;
27
28 /// Convert a loop into a loop with bottom test. It may
29 /// perform loop latch simplication as well if the flag RotationOnly
30 /// is false. The flag Threshold represents the size threshold of the loop
31 /// header. If the loop header's size exceeds the threshold, the loop rotation
32 /// will give up. The flag IsUtilMode controls the heuristic used in the
33 /// LoopRotation. If it is true, the profitability heuristic will be ignored.
34 bool LoopRotation(Loop *L, LoopInfo *LI, const TargetTransformInfo *TTI,
35                   AssumptionCache *AC, DominatorTree *DT, ScalarEvolution *SE,
36                   MemorySSAUpdater *MSSAU, const SimplifyQuery &SQ,
37                   bool RotationOnly, unsigned Threshold, bool IsUtilMode);
38
39 } // namespace llvm
40
41 #endif