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

Values which can be directly representable by MLIR attributes. More...

#include <Evaluator.h>

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

Classes

struct  PrivateTag

Public Member Functions

Attribute getAttr () const
template<typename AttrTy>
AttrTy getAs () const
LogicalResult setAttr (Attribute attr)
Type getType () 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 is unknown (has unknown in its fan-in).
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)
static std::shared_ptr< EvaluatorValue > get (Attribute attr, LocationAttr loc={})
static std::shared_ptr< EvaluatorValue > get (Type type, LocationAttr loc={})

Private Member Functions

 AttributeValue (PrivateTag, Attribute attr, Location loc)
 AttributeValue (PrivateTag, Type type, Location loc)

Private Attributes

Attribute attr = {}
Type type

Friends

std::shared_ptr< EvaluatorValue > get (Attribute attr, LocationAttr loc)
std::shared_ptr< EvaluatorValue > get (Type type, LocationAttr loc)

Additional Inherited Members

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

Detailed Description

Values which can be directly representable by MLIR attributes.

Definition at line 104 of file Evaluator.h.

Constructor & Destructor Documentation

◆ AttributeValue() [1/2]

circt::om::evaluator::AttributeValue::AttributeValue ( PrivateTag ,
Attribute attr,
Location loc )
inlineprivate

◆ AttributeValue() [2/2]

circt::om::evaluator::AttributeValue::AttributeValue ( PrivateTag ,
Type type,
Location loc )
inlineprivate

Member Function Documentation

◆ classof()

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

◆ get() [1/2]

◆ get() [2/2]

std::shared_ptr< EvaluatorValue > circt::om::evaluator::AttributeValue::get ( Type type,
LocationAttr loc = {} )
static

◆ getAs()

template<typename AttrTy>
AttrTy circt::om::evaluator::AttributeValue::getAs ( ) const
inline

Definition at line 108 of file Evaluator.h.

References attr.

◆ getAttr()

Attribute circt::om::evaluator::AttributeValue::getAttr ( ) const
inline

Definition at line 106 of file Evaluator.h.

References attr.

◆ getType()

Type circt::om::evaluator::AttributeValue::getType ( ) const
inline

Definition at line 118 of file Evaluator.h.

References type.

Referenced by AttributeValue(), and setAttr().

◆ setAttr()

LogicalResult circt::om::evaluator::AttributeValue::setAttr ( Attribute attr)

◆ get [1/2]

std::shared_ptr< EvaluatorValue > get ( Attribute attr,
LocationAttr loc )
friend

◆ get [2/2]

std::shared_ptr< evaluator::EvaluatorValue > circt::om::evaluator::AttributeValue::get ( Type type,
LocationAttr loc )
friend

Member Data Documentation

◆ attr

Attribute circt::om::evaluator::AttributeValue::attr = {}
private

Definition at line 140 of file Evaluator.h.

Referenced by AttributeValue(), get, get(), getAs(), getAttr(), and setAttr().

◆ type


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