LLVM 19.0.0git
LoopStrengthReduce.h
Go to the documentation of this file.
1//===- LoopStrengthReduce.h - Loop Strength Reduce Pass ---------*- 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 transformation analyzes and transforms the induction variables (and
10// computations derived from them) into forms suitable for efficient execution
11// on the target.
12//
13// This pass performs a strength reduction on array references inside loops that
14// have as one or more of their components the loop induction variable, it
15// rewrites expressions to take advantage of scaled-index addressing modes
16// available on the target, and it performs a variety of other optimizations
17// related to loop induction variables.
18//
19//===----------------------------------------------------------------------===//
20
21#ifndef LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
22#define LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
23
25#include "llvm/IR/PassManager.h"
26
27namespace llvm {
28
29class Loop;
30class LPMUpdater;
31
32/// Performs Loop Strength Reduce Pass.
33class LoopStrengthReducePass : public PassInfoMixin<LoopStrengthReducePass> {
34public:
37};
38
39} // end namespace llvm
40
41#endif // LLVM_TRANSFORMS_SCALAR_LOOPSTRENGTHREDUCE_H
This header provides classes for managing per-loop analyses.
This header defines various interfaces for pass management in LLVM.
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:348
This class provides an interface for updating the loop pass manager based on mutations to the loop ne...
Performs Loop Strength Reduce Pass.
PreservedAnalyses run(Loop &L, LoopAnalysisManager &AM, LoopStandardAnalysisResults &AR, LPMUpdater &U)
Represents a single loop in the control flow graph.
Definition: LoopInfo.h:44
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:109
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
The adaptor from a function pass to a loop pass computes these analyses and makes them available to t...
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:91