CIRCT  19.0.0git
Public Member Functions | Static Public Member Functions | Private Attributes | List of all members
circt::om::evaluator::AttributeValue Struct Reference

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

#include <Evaluator.h>

Inheritance diagram for circt::om::evaluator::AttributeValue:
Inheritance graph
[legend]
Collaboration diagram for circt::om::evaluator::AttributeValue:
Collaboration graph
[legend]

Public Member Functions

 AttributeValue (Attribute attr)
 
 AttributeValue (Attribute attr, Location loc)
 
 AttributeValue (Type type)
 
 AttributeValue (Type type, Location loc)
 
Attribute getAttr () const
 
template<typename AttrTy >
AttrTy getAs () const
 
LogicalResult setAttr (Attribute attr)
 
LogicalResult finalizeImpl ()
 
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 ()
 
MLIRContext * getContext ()
 Return the associated MLIR context. More...
 
Type getType () const
 
LogicalResult finalize ()
 
Location getLoc () const
 
void setLoc (Location l)
 
void setLocIfUnknown (Location l)
 

Static Public Member Functions

static bool classof (const EvaluatorValue *e)
 

Private Attributes

Attribute attr = {}
 
Type type
 

Additional Inherited Members

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

Detailed Description

Values which can be directly representable by MLIR attributes.

Definition at line 132 of file Evaluator.h.

Constructor & Destructor Documentation

◆ AttributeValue() [1/4]

circt::om::evaluator::AttributeValue::AttributeValue ( Attribute  attr)
inline

Definition at line 133 of file Evaluator.h.

◆ AttributeValue() [2/4]

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

◆ AttributeValue() [3/4]

circt::om::evaluator::AttributeValue::AttributeValue ( Type  type)
inline

Definition at line 142 of file Evaluator.h.

◆ AttributeValue() [4/4]

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

Definition at line 144 of file Evaluator.h.

Member Function Documentation

◆ classof()

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

◆ finalizeImpl()

LogicalResult circt::om::evaluator::AttributeValue::finalizeImpl ( )

Definition at line 887 of file Evaluator.cpp.

◆ getAs()

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

Definition at line 149 of file Evaluator.h.

References attr.

Referenced by circt::om::Evaluator::evaluateIntegerBinaryArithmetic().

◆ getAttr()

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

Definition at line 147 of file Evaluator.h.

References attr.

◆ getType()

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

Definition at line 162 of file Evaluator.h.

References type.

◆ setAttr()

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

Definition at line 874 of file Evaluator.cpp.

Member Data Documentation

◆ attr

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

Definition at line 165 of file Evaluator.h.

Referenced by getAs(), and getAttr().

◆ type

Type circt::om::evaluator::AttributeValue::type
private

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