LLVM 22.0.0git
LoopRotationUtils.h
Go to the documentation of this file.
1//===- LoopRotationUtils.h - Utilities to perform loop rotation -*- C++ -*-===//
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 utilities to convert a loop into a loop with bottom test.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef LLVM_TRANSFORMS_UTILS_LOOPROTATIONUTILS_H
14#define LLVM_TRANSFORMS_UTILS_LOOPROTATIONUTILS_H
15
17
18namespace llvm {
19
20class AssumptionCache;
21class DominatorTree;
22class Loop;
23class LoopInfo;
25class ScalarEvolution;
26struct SimplifyQuery;
28
29/// Convert a loop into a loop with bottom test. It may
30/// perform loop latch simplication as well if the flag RotationOnly
31/// is false. The flag Threshold represents the size threshold of the loop
32/// header. If the loop header's size exceeds the threshold, the loop rotation
33/// will give up. The flag IsUtilMode controls the heuristic used in the
34/// LoopRotation. If it is true, the profitability heuristic will be ignored.
38 MemorySSAUpdater *MSSAU, const SimplifyQuery &SQ,
39 bool RotationOnly, unsigned Threshold,
40 bool IsUtilMode, bool PrepareForLTO = false);
41
42} // namespace llvm
43
44#endif
#define LLVM_ABI
Definition Compiler.h:213
A cache of @llvm.assume calls within a function.
Concrete subclass of DominatorTreeBase that is used to compute a normal dominator tree.
Definition Dominators.h:165
Represents a single loop in the control flow graph.
Definition LoopInfo.h:40
The main scalar evolution driver.
This pass provides access to the codegen interfaces that are needed for IR-level transformations.
This is an optimization pass for GlobalISel generic memory operations.
TargetTransformInfo TTI
LLVM_ABI bool LoopRotation(Loop *L, LoopInfo *LI, const TargetTransformInfo *TTI, AssumptionCache *AC, DominatorTree *DT, ScalarEvolution *SE, MemorySSAUpdater *MSSAU, const SimplifyQuery &SQ, bool RotationOnly, unsigned Threshold, bool IsUtilMode, bool PrepareForLTO=false)
Convert a loop into a loop with bottom test.