Enzyme main
Loading...
Searching...
No Matches
Constraints Class Reference
Inheritance diagram for Constraints:
Collaboration diagram for Constraints:

Public Types

enum class  Type {
  Union = 0 , Intersect = 1 , Compare = 2 , All = 3 ,
  None = 4
}
 
using InnerTy = std::shared_ptr<const Constraints>
 
using SetTy = std::set<InnerTy, ConstraintComparator>
 

Public Member Functions

 Constraints ()
 
 Constraints (Type t)
 
 Constraints (Type t, const SetTy &c, bool check=true)
 
bool operator== (const Constraints &rhs) const
 
bool operator> (const Constraints &rhs) const
 
bool operator< (const Constraints &rhs) const
 
unsigned hash () const
 
bool operator!= (const Constraints &rhs) const
 
bool isNone () const
 
bool isAll () const
 
 __attribute__ ((noinline)) void dump() const
 
InnerTy notB (const ConstraintContext &ctx) const
 
InnerTy orB (InnerTy rhs, const ConstraintContext &ctx) const
 
InnerTy andB (const InnerTy rhs, const ConstraintContext &ctx) const
 
InnerTy remove (const SetTy &sub) const
 
SmallVector< std::pair< Value *, Value * >, 1 > allSolutions (SCEVExpander &Exp, llvm::Type *T, Instruction *IP, const ConstraintContext &ctx, IRBuilder<> &B) const
 

Static Public Member Functions

static InnerTy make_compare (const SCEV *v, bool isEqual, const llvm::Loop *Loop, const ConstraintContext &ctx)
 
static InnerTy all ()
 
static InnerTy none ()
 
static void insert (SetTy &set, InnerTy ty)
 
static SetTy intersect (const SetTy &lhs, const SetTy &rhs)
 
static void set_subtract (SetTy &set, const SetTy &rhs)
 

Public Attributes

enum Constraints::Type ty
 
const SetTy values
 
const SCEV *const node
 
bool isEqual
 
const llvm::Loop *const Loop
 

Detailed Description

Definition at line 7109 of file FunctionUtils.cpp.

Member Typedef Documentation

◆ InnerTy

using Constraints::InnerTy = std::shared_ptr<const Constraints>

Definition at line 7119 of file FunctionUtils.cpp.

◆ SetTy

Definition at line 7121 of file FunctionUtils.cpp.

Member Enumeration Documentation

◆ Type

enum class Constraints::Type
strong
Enumerator
Union 
Intersect 
Compare 
All 
None 

Definition at line 7111 of file FunctionUtils.cpp.

Constructor & Destructor Documentation

◆ Constraints() [1/3]

Constraints::Constraints ( )
inline

Definition at line 7134 of file FunctionUtils.cpp.

Referenced by make_compare().

◆ Constraints() [2/3]

Constraints::Constraints ( Type t)
inline

Definition at line 7147 of file FunctionUtils.cpp.

References All, and None.

◆ Constraints() [3/3]

Constraints::Constraints ( Type t,
const SetTy & c,
bool check = true )
inline

Definition at line 7151 of file FunctionUtils.cpp.

References All, Compare, Intersect, isEqual, Loop, node, None, ty, and Union.

Member Function Documentation

◆ __attribute__()

Constraints::__attribute__ ( (noinline) ) const
inline

Definition at line 7305 of file FunctionUtils.cpp.

◆ all()

static InnerTy Constraints::all ( )
inlinestatic

Definition at line 7260 of file FunctionUtils.cpp.

References All.

Referenced by allSolutions(), andB(), fixSparseIndices(), getSparseConditions(), make_compare(), notB(), and remove().

◆ allSolutions()

SmallVector< std::pair< Value *, Value * >, 1 > Constraints::allSolutions ( SCEVExpander & Exp,
llvm::Type * T,
Instruction * IP,
const ConstraintContext & ctx,
IRBuilder<> & B ) const

◆ andB()

◆ hash()

unsigned Constraints::hash ( ) const
inline

Definition at line 7251 of file FunctionUtils.cpp.

References isEqual, Loop, node, ty, and values.

◆ insert()

static void Constraints::insert ( SetTy & set,
InnerTy ty )
inlinestatic

Definition at line 7270 of file FunctionUtils.cpp.

References ty.

Referenced by andB(), and notB().

◆ intersect()

static SetTy Constraints::intersect ( const SetTy & lhs,
const SetTy & rhs )
inlinestatic

Definition at line 7284 of file FunctionUtils.cpp.

Referenced by andB().

◆ isAll()

bool Constraints::isAll ( ) const
inline

Definition at line 7269 of file FunctionUtils.cpp.

References All, and ty.

Referenced by andB().

◆ isNone()

bool Constraints::isNone ( ) const
inline

Definition at line 7268 of file FunctionUtils.cpp.

References None, and ty.

Referenced by andB().

◆ make_compare()

Constraints::InnerTy Constraints::make_compare ( const SCEV * v,
bool isEqual,
const llvm::Loop * Loop,
const ConstraintContext & ctx )
static

◆ none()

static InnerTy Constraints::none ( )
inlinestatic

Definition at line 7264 of file FunctionUtils.cpp.

References None.

Referenced by andB(), fixSparseIndices(), getSparseConditions(), make_compare(), notB(), and remove().

◆ notB()

InnerTy Constraints::notB ( const ConstraintContext & ctx) const
inline

Definition at line 7306 of file FunctionUtils.cpp.

References All, all(), Compare, insert(), Intersect, isEqual, Loop, make_compare(), node, None, none(), ty, Union, and values.

Referenced by orB().

◆ operator!=()

bool Constraints::operator!= ( const Constraints & rhs) const
inline

Definition at line 7259 of file FunctionUtils.cpp.

◆ operator<()

bool Constraints::operator< ( const Constraints & rhs) const
inline

Definition at line 7212 of file FunctionUtils.cpp.

References isEqual, Loop, node, ty, and values.

◆ operator==()

bool Constraints::operator== ( const Constraints & rhs) const
inline

Definition at line 7183 of file FunctionUtils.cpp.

References isEqual, Loop, node, ty, and values.

◆ operator>()

bool Constraints::operator> ( const Constraints & rhs) const
inline

Definition at line 7211 of file FunctionUtils.cpp.

◆ orB()

InnerTy Constraints::orB ( InnerTy rhs,
const ConstraintContext & ctx ) const
inline

Definition at line 7335 of file FunctionUtils.cpp.

References notB().

◆ remove()

InnerTy Constraints::remove ( const SetTy & sub) const
inline

Definition at line 7789 of file FunctionUtils.cpp.

References all(), Intersect, none(), set_subtract(), ty, Union, and values.

Referenced by andB().

◆ set_subtract()

static void Constraints::set_subtract ( SetTy & set,
const SetTy & rhs )
inlinestatic

Definition at line 7291 of file FunctionUtils.cpp.

Referenced by remove().

Member Data Documentation

◆ isEqual

bool Constraints::isEqual

◆ Loop

const llvm::Loop* const Constraints::Loop

◆ node

const SCEV* const Constraints::node

◆ ty

◆ values

const SetTy Constraints::values

Definition at line 7123 of file FunctionUtils.cpp.

Referenced by allSolutions(), andB(), hash(), notB(), operator<(), operator<<(), operator==(), and remove().


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