llvm::StraightLineStrengthReducePass

Performs straight-line strength reduction on arithmetic expressions.

Synopsis

Declared in <llvm/Transforms/Scalar/StraightLineStrengthReduce.h>

class StraightLineStrengthReducePass
    : public OptionalPassInfoMixin<StraightLineStrengthReducePass>

Description

Unlike loop strength reduction, this pass reduces arithmetic redundancy in straight-line code (typically from unrolled loops) by rewriting dominated Add/Mul/GEP candidates relative to an earlier basis.

Base Classes

NameDescription
OptionalPassInfoMixin<StraightLineStrengthReducePass>A CRTP mix-in for passes that can be skipped.

Member Functions

NameDescription
run Run straight-line strength reduction over the function.

Static Member Functions

NameDescription
isRequired Return false; optional passes may be skipped.