LLVM
8.0.1
|
This class represents a composition of other SCEV predicates, and is the class that most clients will interact with. More...
#include "llvm/Analysis/ScalarEvolution.h"
Public Member Functions | |
SCEVUnionPredicate () | |
Union predicates don't get cached so create a dummy set ID for it. More... | |
const SmallVectorImpl< const SCEVPredicate * > & | getPredicates () const |
void | add (const SCEVPredicate *N) |
Adds a predicate to this union. More... | |
ArrayRef< const SCEVPredicate * > | getPredicatesForExpr (const SCEV *Expr) |
Returns a reference to a vector containing all predicates which apply to Expr . More... | |
bool | isAlwaysTrue () const override |
Implementation of the SCEVPredicate interface. More... | |
bool | implies (const SCEVPredicate *N) const override |
Returns true if this predicate implies N . More... | |
void | print (raw_ostream &OS, unsigned Depth) const override |
Prints a textual representation of this predicate with an indentation of Depth . More... | |
const SCEV * | getExpr () const override |
Returns the SCEV to which this predicate applies, or nullptr if this is a SCEVUnionPredicate. More... | |
unsigned | getComplexity () const override |
We estimate the complexity of a union predicate as the size number of predicates in the union. More... | |
Public Member Functions inherited from llvm::SCEVPredicate | |
SCEVPredicate (const FoldingSetNodeIDRef ID, SCEVPredicateKind Kind) | |
SCEV predicates. More... | |
SCEVPredicateKind | getKind () const |
Public Member Functions inherited from llvm::FoldingSetBase::Node | |
Node ()=default | |
void * | getNextInBucket () const |
void | SetNextInBucket (void *N) |
Static Public Member Functions | |
static bool | classof (const SCEVPredicate *P) |
Methods for support type inquiry through isa, cast, and dyn_cast: More... | |
Additional Inherited Members | |
Public Types inherited from llvm::SCEVPredicate | |
enum | SCEVPredicateKind { P_Union, P_Equal, P_Wrap } |
Protected Member Functions inherited from llvm::SCEVPredicate | |
~SCEVPredicate ()=default | |
SCEVPredicate (const SCEVPredicate &)=default | |
SCEVPredicate & | operator= (const SCEVPredicate &)=default |
Protected Attributes inherited from llvm::SCEVPredicate | |
SCEVPredicateKind | Kind |
This class represents a composition of other SCEV predicates, and is the class that most clients will interact with.
This is equivalent to a logical "AND" of all the predicates in the union.
NB! Unlike other SCEVPredicate sub-classes this class does not live in the ScalarEvolution::Preds folding set. This is why the add
function is sound.
Definition at line 381 of file ScalarEvolution.h.
SCEVUnionPredicate::SCEVUnionPredicate | ( | ) |
Union predicates don't get cached so create a dummy set ID for it.
Definition at line 12228 of file ScalarEvolution.cpp.
void SCEVUnionPredicate::add | ( | const SCEVPredicate * | N | ) |
Adds a predicate to this union.
Definition at line 12265 of file ScalarEvolution.cpp.
References assert(), llvm::SCEVPredicate::getExpr(), and implies().
Referenced by llvm::PredicatedScalarEvolution::addPredicate(), llvm::ScalarEvolution::forgetValue(), and llvm::PredicatedScalarEvolution::getAsAddRec().
|
inlinestatic |
Methods for support type inquiry through isa, cast, and dyn_cast:
Definition at line 417 of file ScalarEvolution.h.
References llvm::SCEVPredicate::getKind().
|
inlineoverridevirtual |
We estimate the complexity of a union predicate as the size number of predicates in the union.
Reimplemented from llvm::SCEVPredicate.
Definition at line 414 of file ScalarEvolution.h.
References llvm::SmallVectorBase::size().
Referenced by isLoadConditional().
Returns the SCEV to which this predicate applies, or nullptr if this is a SCEVUnionPredicate.
Implements llvm::SCEVPredicate.
Definition at line 12258 of file ScalarEvolution.cpp.
|
inline |
Definition at line 395 of file ScalarEvolution.h.
References llvm::ARM_AM::add, llvm::Depth, llvm::HexagonMCInstrInfo::getExpr(), N, and llvm::SCEV::print().
Referenced by llvm::LoopVectorizationCostModel::computeMaxVF(), and llvm::SCEVExpander::expandUnionPredicate().
ArrayRef< const SCEVPredicate * > SCEVUnionPredicate::getPredicatesForExpr | ( | const SCEV * | Expr | ) |
Returns a reference to a vector containing all predicates which apply to Expr
.
Definition at line 12237 of file ScalarEvolution.cpp.
References llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), and I.
Referenced by llvm::ScalarEvolution::getWrapPredicate().
|
overridevirtual |
Returns true if this predicate implies N
.
Implements llvm::SCEVPredicate.
Definition at line 12244 of file ScalarEvolution.cpp.
References llvm::all_of(), llvm::any_of(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::end(), llvm::DenseMapBase< DerivedT, KeyT, ValueT, KeyInfoT, BucketT >::find(), llvm::SCEVPredicate::getExpr(), I, and llvm::SCEVPredicate::implies().
Referenced by add(), llvm::PredicatedScalarEvolution::addPredicate(), and llvm::ScalarEvolution::getWrapPredicate().
|
overridevirtual |
Implementation of the SCEVPredicate interface.
Implements llvm::SCEVPredicate.
Definition at line 12231 of file ScalarEvolution.cpp.
References llvm::all_of(), I, and llvm::SCEVPredicate::isAlwaysTrue().
Referenced by llvm::LoopVersioning::annotateInstWithNoAlias(), and isLoadConditional().
|
overridevirtual |
Prints a textual representation of this predicate with an indentation of Depth
.
Implements llvm::SCEVPredicate.
Definition at line 12260 of file ScalarEvolution.cpp.
Referenced by PrintLoopInfo().