LLVM 19.0.0git
Public Member Functions | Static Public Member Functions | List of all members
llvm::SCEVUnionPredicate Class Referencefinal

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"

Inheritance diagram for llvm::SCEVUnionPredicate:
Inheritance graph
[legend]

Public Member Functions

 SCEVUnionPredicate (ArrayRef< const SCEVPredicate * > Preds)
 Union predicates don't get cached so create a dummy set ID for it.
 
const SmallVectorImpl< const SCEVPredicate * > & getPredicates () const
 
bool isAlwaysTrue () const override
 Implementation of the SCEVPredicate interface.
 
bool implies (const SCEVPredicate *N) const override
 Returns true if this predicate implies N.
 
void print (raw_ostream &OS, unsigned Depth) const override
 Prints a textual representation of this predicate with an indentation of Depth.
 
unsigned getComplexity () const override
 We estimate the complexity of a union predicate as the size number of predicates in the union.
 
- Public Member Functions inherited from llvm::SCEVPredicate
 SCEVPredicate (const FoldingSetNodeIDRef ID, SCEVPredicateKind Kind)
 SCEV predicates.
 
SCEVPredicateKind getKind () const
 
virtual unsigned getComplexity () const
 Returns the estimated complexity of this predicate.
 
virtual bool isAlwaysTrue () const =0
 Returns true if the predicate is always true.
 
virtual bool implies (const SCEVPredicate *N) const =0
 Returns true if this predicate implies N.
 
virtual void print (raw_ostream &OS, unsigned Depth=0) const =0
 Prints a textual representation of this predicate with an indentation of Depth.
 
- 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:
 

Additional Inherited Members

- Public Types inherited from llvm::SCEVPredicate
enum  SCEVPredicateKind { P_Union , P_Compare , P_Wrap }
 
- Protected Member Functions inherited from llvm::SCEVPredicate
 ~SCEVPredicate ()=default
 
 SCEVPredicate (const SCEVPredicate &)=default
 
SCEVPredicateoperator= (const SCEVPredicate &)=default
 
- Protected Attributes inherited from llvm::SCEVPredicate
SCEVPredicateKind Kind
 

Detailed Description

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 416 of file ScalarEvolution.h.

Constructor & Destructor Documentation

◆ SCEVUnionPredicate()

SCEVUnionPredicate::SCEVUnionPredicate ( ArrayRef< const SCEVPredicate * >  Preds)

Union predicates don't get cached so create a dummy set ID for it.

Definition at line 14705 of file ScalarEvolution.cpp.

References P.

Member Function Documentation

◆ classof()

static bool llvm::SCEVUnionPredicate::classof ( const SCEVPredicate P)
inlinestatic

Methods for support type inquiry through isa, cast, and dyn_cast:

Definition at line 444 of file ScalarEvolution.h.

References P, and llvm::SCEVPredicate::P_Union.

◆ getComplexity()

unsigned llvm::SCEVUnionPredicate::getComplexity ( ) const
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 441 of file ScalarEvolution.h.

References llvm::SmallVectorBase< Size_T >::size().

◆ getPredicates()

const SmallVectorImpl< const SCEVPredicate * > & llvm::SCEVUnionPredicate::getPredicates ( ) const
inline

Definition at line 430 of file ScalarEvolution.h.

◆ implies()

bool SCEVUnionPredicate::implies ( const SCEVPredicate N) const
overridevirtual

Returns true if this predicate implies N.

Implements llvm::SCEVPredicate.

Definition at line 14716 of file ScalarEvolution.cpp.

References llvm::all_of(), llvm::any_of(), I, and N.

◆ isAlwaysTrue()

bool SCEVUnionPredicate::isAlwaysTrue ( ) const
overridevirtual

Implementation of the SCEVPredicate interface.

Implements llvm::SCEVPredicate.

Definition at line 14711 of file ScalarEvolution.cpp.

References llvm::all_of(), and I.

◆ print()

void SCEVUnionPredicate::print ( raw_ostream OS,
unsigned  Depth 
) const
overridevirtual

Prints a textual representation of this predicate with an indentation of Depth.

Implements llvm::SCEVPredicate.

Definition at line 14725 of file ScalarEvolution.cpp.

References llvm::Depth, OS, and llvm::SCEVPredicate::print().


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