class SetTheory

Declaration

class SetTheory { /* full declaration omitted */ };

Declared at: llvm/include/llvm/TableGen/SetTheory.h:64

Method Overview

  • public SetTheory()
  • public void addExpander(llvm::StringRef ClassName, std::unique_ptr<Expander>)
  • public void addFieldExpander(llvm::StringRef ClassName, llvm::StringRef FieldName)
  • public void addOperator(llvm::StringRef Name, std::unique_ptr<Operator>)
  • public void evaluate(llvm::Init * Expr, llvm::SetTheory::RecSet & Elts, ArrayRef<llvm::SMLoc> Loc)
  • public template <typename Iter>void evaluate(Iter begin, Iter end, llvm::SetTheory::RecSet & Elts, ArrayRef<llvm::SMLoc> Loc)
  • public const llvm::SetTheory::RecVec * expand(llvm::Record * Set)

Methods

SetTheory()

Description

Create a SetTheory instance with only the standard operators.

Declared at: llvm/include/llvm/TableGen/SetTheory.h:108

void addExpander(llvm::StringRef ClassName,
                 std::unique_ptr<Expander>)

Description

addExpander - Add an expander for Records with the named super class.

Declared at: llvm/include/llvm/TableGen/SetTheory.h:111

Parameters

llvm::StringRef ClassName
std::unique_ptr<Expander>

void addFieldExpander(llvm::StringRef ClassName,
                      llvm::StringRef FieldName)

Description

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 d> { dag Elts = d; }

Declared at: llvm/include/llvm/TableGen/SetTheory.h:121

Parameters

llvm::StringRef ClassName
llvm::StringRef FieldName

void addOperator(llvm::StringRef Name,
                 std::unique_ptr<Operator>)

Description

addOperator - Add a DAG operator.

Declared at: llvm/include/llvm/TableGen/SetTheory.h:124

Parameters

llvm::StringRef Name
std::unique_ptr<Operator>

void evaluate(llvm::Init* Expr,
              llvm::SetTheory::RecSet& Elts,
              ArrayRef<llvm::SMLoc> Loc)

Description

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

Declared at: llvm/include/llvm/TableGen/SetTheory.h:127

Parameters

llvm::Init* Expr
llvm::SetTheory::RecSet& Elts
ArrayRef<llvm::SMLoc> Loc

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

Description

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

Declared at: llvm/include/llvm/TableGen/SetTheory.h:131

Templates

Iter

Parameters

Iter begin
Iter end
llvm::SetTheory::RecSet& Elts
ArrayRef<llvm::SMLoc> Loc

const llvm::SetTheory::RecVec* expand(
    llvm::Record* Set)

Description

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.

Declared at: llvm/include/llvm/TableGen/SetTheory.h:139

Parameters

llvm::Record* Set