CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::om::evaluator::OptionValue Class Reference

An option whose payload may be unevaluated to support forward references and cycles. More...

#include <Evaluator.h>

Inheritance diagram for circt::om::evaluator::OptionValue:
Collaboration diagram for circt::om::evaluator::OptionValue:

Public Member Functions

 OptionValue (om::OptionType type, Location loc)
 OptionValue (om::OptionType type, EvaluatorValuePtr value, Location loc)
void setValue (EvaluatorValuePtr newValue)
om::OptionType getOptionType () const
bool hasValue () const
const EvaluatorValuePtr & getValue () const
Public Member Functions inherited from circt::om::evaluator::EvaluatorValue
 EvaluatorValue (MLIRContext *ctx, Kind kind, Location loc)
Kind getKind () const
MLIRContext * getContext () const
bool isFullyEvaluated () const
void markFullyEvaluated ()
bool isUnknown () const
 Return true if the value itself is unknown.
void markUnknown ()
 Mark this value as unknown.
MLIRContext * getContext ()
 Return the associated MLIR context.
Type getType () const
Location getLoc () const
void setLoc (Location l)
void setLocIfUnknown (Location l)

Static Public Member Functions

static bool classof (const EvaluatorValue *e)

Private Attributes

om::OptionType type
EvaluatorValuePtr value

Additional Inherited Members

Public Types inherited from circt::om::evaluator::EvaluatorValue
enum class  Kind {
  Attr , Object , List , Option ,
  BasePath , Path
}

Detailed Description

An option whose payload may be unevaluated to support forward references and cycles.

Options imported into scratch IR with unknown payloads are canonicalized to unknown options during elaboration.

Definition at line 184 of file Evaluator.h.

Constructor & Destructor Documentation

◆ OptionValue() [1/2]

circt::om::evaluator::OptionValue::OptionValue ( om::OptionType type,
Location loc )
inline

◆ OptionValue() [2/2]

Member Function Documentation

◆ classof()

bool circt::om::evaluator::OptionValue::classof ( const EvaluatorValue * e)
inlinestatic

◆ getOptionType()

om::OptionType circt::om::evaluator::OptionValue::getOptionType ( ) const
inline

Definition at line 203 of file Evaluator.h.

References type.

Referenced by circt::om::evaluator::EvaluatorValue::getType().

◆ getValue()

const EvaluatorValuePtr & circt::om::evaluator::OptionValue::getValue ( ) const
inline

Definition at line 211 of file Evaluator.h.

References assert(), hasValue(), and value.

◆ hasValue()

bool circt::om::evaluator::OptionValue::hasValue ( ) const
inline

◆ setValue()

void circt::om::evaluator::OptionValue::setValue ( EvaluatorValuePtr newValue)
inline

Member Data Documentation

◆ type

◆ value

EvaluatorValuePtr circt::om::evaluator::OptionValue::value
private

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