LLVM  4.0.0
Public Types | Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
llvm::SCEVPredicate Class Referenceabstract

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

#include <ScalarEvolution.h>

Inheritance diagram for llvm::SCEVPredicate:
[legend]
Collaboration diagram for llvm::SCEVPredicate:
[legend]

Public Types

enum  SCEVPredicateKind { P_Union, P_Equal, P_Wrap }
 

Public Member Functions

 SCEVPredicate (const FoldingSetNodeIDRef ID, SCEVPredicateKind Kind)
 SCEV predicates. More...
 
SCEVPredicateKind getKind () const
 
virtual unsigned getComplexity () const
 Returns the estimated complexity of this predicate. More...
 
virtual bool isAlwaysTrue () const =0
 Returns true if the predicate is always true. More...
 
virtual bool implies (const SCEVPredicate *N) const =0
 Returns true if this predicate implies N. More...
 
virtual void print (raw_ostream &OS, unsigned Depth=0) const =0
 Prints a textual representation of this predicate with an indentation of Depth. More...
 
virtual const SCEVgetExpr () const =0
 Returns the SCEV to which this predicate applies, or nullptr if this is a SCEVUnionPredicate. More...
 
- Public Member Functions inherited from llvm::FoldingSetImpl::Node
 Node ()
 
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 174 of file ScalarEvolution.h.

Member Enumeration Documentation

Enumerator
P_Union 
P_Equal 
P_Wrap 

Definition at line 182 of file ScalarEvolution.h.

Constructor & Destructor Documentation

llvm::SCEVPredicate::~SCEVPredicate ( )
protecteddefault
llvm::SCEVPredicate::SCEVPredicate ( const SCEVPredicate )
protecteddefault
SCEVPredicate::SCEVPredicate ( const FoldingSetNodeIDRef  ID,
SCEVPredicateKind  Kind 
)

SCEV predicates.

Definition at line 10246 of file ScalarEvolution.cpp.

Member Function Documentation

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

virtual const SCEV* llvm::SCEVPredicate::getExpr ( ) const
pure virtual

Returns the SCEV to which this predicate applies, or nullptr if this is a SCEVUnionPredicate.

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

Referenced by llvm::SCEVUnionPredicate::add().

SCEVPredicateKind llvm::SCEVPredicate::getKind ( ) const
inline
virtual bool llvm::SCEVPredicate::implies ( const SCEVPredicate N) const
pure virtual

Returns true if this predicate implies N.

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

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::SCEVUnionPredicate, llvm::SCEVWrapPredicate, and llvm::SCEVEqualPredicate.

Referenced by llvm::SCEVUnionPredicate::isAlwaysTrue().

SCEVPredicate& llvm::SCEVPredicate::operator= ( const SCEVPredicate )
protecteddefault
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::SCEVUnionPredicate, llvm::SCEVWrapPredicate, and llvm::SCEVEqualPredicate.

Referenced by llvm::operator<<().

Friends And Related Function Documentation

friend struct FoldingSetTrait< SCEVPredicate >
friend

Definition at line 175 of file ScalarEvolution.h.

Member Data Documentation

SCEVPredicateKind llvm::SCEVPredicate::Kind
protected

Definition at line 185 of file ScalarEvolution.h.

Referenced by getKind().


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