LLVM 22.0.0git
llvm::SCEVPredicate Class Referenceabstract

This class represents an assumption made using SCEV expressions which can be checked at run-time. More...

#include "llvm/Analysis/ScalarEvolution.h"

Inheritance diagram for llvm::SCEVPredicate:
[legend]

Public Types

enum  SCEVPredicateKind { P_Union , P_Compare , P_Wrap }

Public Member Functions

LLVM_ABI 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, ScalarEvolution &SE) 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)

Protected Member Functions

 ~SCEVPredicate ()=default
 SCEVPredicate (const SCEVPredicate &)=default
SCEVPredicateoperator= (const SCEVPredicate &)=default

Protected Attributes

SCEVPredicateKind Kind

Friends

struct FoldingSetTrait< SCEVPredicate >

Detailed Description

This class represents an assumption made using SCEV expressions which can be checked at run-time.

Definition at line 215 of file ScalarEvolution.h.

Member Enumeration Documentation

◆ SCEVPredicateKind

Enumerator
P_Union 
P_Compare 
P_Wrap 

Definition at line 223 of file ScalarEvolution.h.

Constructor & Destructor Documentation

◆ ~SCEVPredicate()

llvm::SCEVPredicate::~SCEVPredicate ( )
protecteddefault

◆ SCEVPredicate() [1/2]

◆ SCEVPredicate() [2/2]

SCEVPredicate::SCEVPredicate ( const FoldingSetNodeIDRef ID,
SCEVPredicateKind Kind )

SCEV predicates.

Definition at line 15017 of file ScalarEvolution.cpp.

References Kind.

Member Function Documentation

◆ getComplexity()

virtual unsigned llvm::SCEVPredicate::getComplexity ( ) const
inlinevirtual

Returns the estimated complexity of this predicate.

This is roughly measured in the number of run-time checks required.

Reimplemented in llvm::SCEVUnionPredicate.

Definition at line 238 of file ScalarEvolution.h.

◆ getKind()

SCEVPredicateKind llvm::SCEVPredicate::getKind ( ) const
inline

Definition at line 234 of file ScalarEvolution.h.

References Kind.

◆ implies()

virtual bool llvm::SCEVPredicate::implies ( const SCEVPredicate * N,
ScalarEvolution & SE ) const
pure virtual

Returns true if this predicate implies N.

Implemented in llvm::SCEVComparePredicate, llvm::SCEVUnionPredicate, and llvm::SCEVWrapPredicate.

References N, and SCEVPredicate().

◆ isAlwaysTrue()

virtual bool llvm::SCEVPredicate::isAlwaysTrue ( ) const
pure virtual

Returns true if the predicate is always true.

This means that no assumptions were made and nothing needs to be checked at run-time.

Implemented in llvm::SCEVComparePredicate, llvm::SCEVUnionPredicate, and llvm::SCEVWrapPredicate.

◆ operator=()

SCEVPredicate & llvm::SCEVPredicate::operator= ( const SCEVPredicate & )
protecteddefault

References Kind, LLVM_ABI, and SCEVPredicate().

◆ print()

virtual void llvm::SCEVPredicate::print ( raw_ostream & OS,
unsigned Depth = 0 ) const
pure virtual

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

Implemented in llvm::SCEVComparePredicate, llvm::SCEVUnionPredicate, and llvm::SCEVWrapPredicate.

References llvm::Depth.

◆ FoldingSetTrait< SCEVPredicate >

friend struct FoldingSetTrait< SCEVPredicate >
friend

Definition at line 210 of file ScalarEvolution.h.

References LLVM_ABI.

Member Data Documentation

◆ Kind

SCEVPredicateKind llvm::SCEVPredicate::Kind
protected

Definition at line 226 of file ScalarEvolution.h.

Referenced by getKind(), operator=(), and SCEVPredicate().


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