Loading [MathJax]/extensions/tex2jax.js
CIRCT 21.0.0git
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | Friends | 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]

Classes

struct  PrivateTag
 

Public Member Functions

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.
 
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)
 
static std::shared_ptr< EvaluatorValueget (Attribute attr, LocationAttr loc={})
 
static std::shared_ptr< EvaluatorValueget (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< EvaluatorValueget (Attribute attr, LocationAttr loc)
 
std::shared_ptr< EvaluatorValueget (Type type, LocationAttr loc)
 

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/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

Definition at line 167 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 946 of file Evaluator.cpp.

References getLoc().

◆ get() [1/2]

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

◆ get() [2/2]

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

Definition at line 977 of file Evaluator.cpp.

◆ getAs()

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

Definition at line 135 of file Evaluator.h.

References attr.

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

◆ getAttr()

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

Definition at line 133 of file Evaluator.h.

References attr.

◆ getType()

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

Definition at line 148 of file Evaluator.h.

References type.

◆ setAttr()

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

Definition at line 933 of file Evaluator.cpp.

References getLoc().

Friends And Related Symbol Documentation

◆ get [1/2]

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

◆ get [2/2]

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

Member Data Documentation

◆ attr

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

Definition at line 170 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: