LLVM 23.0.0git
llvm::ScalarEvolution::ExitLimit Struct Reference

Information about the number of loop iterations for which a loop exit's branch condition evaluates to the not-taken path. More...

#include "llvm/Analysis/ScalarEvolution.h"

Public Member Functions

LLVM_ABI ExitLimit (const SCEV *E)
 Construct either an exact exit limit from a constant, or an unknown one from a SCEVCouldNotCompute.
 ExitLimit (SCEVUse E)
LLVM_ABI ExitLimit (const SCEV *E, const SCEV *ConstantMaxNotTaken, const SCEV *SymbolicMaxNotTaken, bool MaxOrZero, ArrayRef< ArrayRef< const SCEVPredicate * > > PredLists={})
LLVM_ABI ExitLimit (const SCEV *E, const SCEV *ConstantMaxNotTaken, const SCEV *SymbolicMaxNotTaken, bool MaxOrZero, ArrayRef< const SCEVPredicate * > PredList)
bool hasAnyInfo () const
 Test whether this ExitLimit contains any computed information, or whether it's all SCEVCouldNotCompute values.
bool hasFullInfo () const
 Test whether this ExitLimit contains all information.

Public Attributes

const SCEVExactNotTaken
const SCEVConstantMaxNotTaken
const SCEVSymbolicMaxNotTaken
bool MaxOrZero = false
SmallVector< const SCEVPredicate *, 4 > Predicates
 A vector of predicate guards for this ExitLimit.

Detailed Description

Information about the number of loop iterations for which a loop exit's branch condition evaluates to the not-taken path.

This is a temporary pair of exact and max expressions that are eventually summarized in ExitNotTakenInfo and BackedgeTakenInfo.

Definition at line 1239 of file ScalarEvolution.h.

Constructor & Destructor Documentation

◆ ExitLimit() [1/4]

ScalarEvolution::ExitLimit::ExitLimit ( const SCEV * E)

Construct either an exact exit limit from a constant, or an unknown one from a SCEVCouldNotCompute.

No other types of SCEVs are allowed as arguments and asserts enforce that internally.

Definition at line 8950 of file ScalarEvolution.cpp.

References ExitLimit().

Referenced by ExitLimit(), ExitLimit(), and ExitLimit().

◆ ExitLimit() [2/4]

llvm::ScalarEvolution::ExitLimit::ExitLimit ( SCEVUse E)
inline

Definition at line 1257 of file ScalarEvolution.h.

References const, E(), and ExitLimit().

◆ ExitLimit() [3/4]

ScalarEvolution::ExitLimit::ExitLimit ( const SCEV * E,
const SCEV * ConstantMaxNotTaken,
const SCEV * SymbolicMaxNotTaken,
bool MaxOrZero,
ArrayRef< ArrayRef< const SCEVPredicate * > > PredLists = {} )

◆ ExitLimit() [4/4]

ScalarEvolution::ExitLimit::ExitLimit ( const SCEV * E,
const SCEV * ConstantMaxNotTaken,
const SCEV * SymbolicMaxNotTaken,
bool MaxOrZero,
ArrayRef< const SCEVPredicate * > PredList )

Definition at line 8995 of file ScalarEvolution.cpp.

References ConstantMaxNotTaken, ExitLimit(), MaxOrZero, and SymbolicMaxNotTaken.

Member Function Documentation

◆ hasAnyInfo()

bool llvm::ScalarEvolution::ExitLimit::hasAnyInfo ( ) const
inline

Test whether this ExitLimit contains any computed information, or whether it's all SCEVCouldNotCompute values.

Definition at line 1270 of file ScalarEvolution.h.

References ConstantMaxNotTaken, ExactNotTaken, and llvm::isa().

◆ hasFullInfo()

bool llvm::ScalarEvolution::ExitLimit::hasFullInfo ( ) const
inline

Test whether this ExitLimit contains all information.

Definition at line 1276 of file ScalarEvolution.h.

References ExactNotTaken, and llvm::isa().

Member Data Documentation

◆ ConstantMaxNotTaken

const SCEV* llvm::ScalarEvolution::ExitLimit::ConstantMaxNotTaken

Definition at line 1241 of file ScalarEvolution.h.

Referenced by ExitLimit(), ExitLimit(), and hasAnyInfo().

◆ ExactNotTaken

const SCEV* llvm::ScalarEvolution::ExitLimit::ExactNotTaken

Definition at line 1240 of file ScalarEvolution.h.

Referenced by ExitLimit(), hasAnyInfo(), and hasFullInfo().

◆ MaxOrZero

bool llvm::ScalarEvolution::ExitLimit::MaxOrZero = false

Definition at line 1246 of file ScalarEvolution.h.

Referenced by ExitLimit(), and ExitLimit().

◆ Predicates

SmallVector<const SCEVPredicate *, 4> llvm::ScalarEvolution::ExitLimit::Predicates

A vector of predicate guards for this ExitLimit.

The result is only valid if all of the predicates in Predicates evaluate to 'true' at run-time.

Definition at line 1251 of file ScalarEvolution.h.

Referenced by ExitLimit().

◆ SymbolicMaxNotTaken

const SCEV* llvm::ScalarEvolution::ExitLimit::SymbolicMaxNotTaken

Definition at line 1243 of file ScalarEvolution.h.

Referenced by ExitLimit(), and ExitLimit().


The documentation for this struct was generated from the following files: