LLVM: llvm::SetTheory Class Reference (original) (raw)

#include "[llvm/TableGen/SetTheory.h](SetTheory%5F8h%5Fsource.html)"

Public Member Functions
SetTheory ()
Create a SetTheory instance with only the standard operators.
void addExpander (StringRef ClassName, std::unique_ptr< Expander >)
addExpander - Add an expander for Records with the named super class.
void addFieldExpander (StringRef ClassName, StringRef FieldName)
addFieldExpander - Add an expander for ClassName that simply evaluates FieldName in the Record to get the set elements.
void addOperator (StringRef Name, std::unique_ptr< Operator >)
addOperator - Add a DAG operator.
void evaluate (const Init *Expr, RecSet &Elts, ArrayRef< SMLoc > Loc)
evaluate - Evaluate Expr and append the resulting set to Elts.
template
void evaluate (Iter begin, Iter end, RecSet &Elts, ArrayRef< SMLoc > Loc)
evaluate - Evaluate a sequence of Inits and append to Elts.
const RecVec * expand (const Record *Set)
expand - Expand a record into a set of elements if possible.

Definition at line 65 of file SetTheory.h.

RecSet

RecVec

addExpander()

addFieldExpander()

addFieldExpander - Add an expander for ClassName that simply evaluates FieldName in the Record to get the set elements.

That is all that is needed for a class like:

class Set { dag Elts = d; }

Definition at line 278 of file SetTheory.cpp.

References addExpander().

addOperator()

evaluate() [1/2]

evaluate - Evaluate Expr and append the resulting set to Elts.

Definition at line 282 of file SetTheory.cpp.

References llvm::dyn_cast(), evaluate(), expand(), llvm::Init::getAsString(), I, llvm::SetVector< T, Vector, Set, N >::insert(), llvm::SetVector< T, Vector, Set, N >::insert_range(), and llvm::PrintFatalError().

Referenced by evaluate(), and evaluate().

evaluate() [2/2]

template

void llvm::SetTheory::evaluate ( Iter begin, Iter end, RecSet & Elts, ArrayRef< SMLoc > Loc ) inline

evaluate - Evaluate a sequence of Inits and append to Elts.

Definition at line 132 of file SetTheory.h.

References evaluate().

expand()

expand - Expand a record into a set of elements if possible.

Return a pointer to the expanded elements, or NULL if Set cannot be expanded further.

Definition at line 308 of file SetTheory.cpp.

References llvm::SetVector< T, Vector, Set, N >::begin(), llvm::SetVector< T, Vector, Set, N >::end(), I, and llvm::isa().

Referenced by evaluate().


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