|
CIRCT 23.0.0git
|
Base class for evaluator runtime values. More...
#include <Evaluator.h>


Public Types | |
| enum class | Kind { Attr , Object , List , Reference , BasePath , Path } |
Public Member Functions | |
| 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 |
| LogicalResult | finalize () |
| Location | getLoc () const |
| void | setLoc (Location l) |
| void | setLocIfUnknown (Location l) |
Private Attributes | |
| const Kind | kind |
| MLIRContext * | ctx |
| Location | loc |
| bool | fullyEvaluated = false |
| bool | finalized = false |
| bool | unknown = false |
Base class for evaluator runtime values.
Enables the shared_from_this functionality so Evaluator Value pointers can be passed through the CAPI and unwrapped back into C++ smart pointers with the appropriate reference count.
Definition at line 48 of file Evaluator.h.
|
strong |
| Enumerator | |
|---|---|
| Attr | |
| Object | |
| List | |
| Reference | |
| BasePath | |
| Path | |
Definition at line 51 of file Evaluator.h.
|
inline |
Definition at line 52 of file Evaluator.h.
| LogicalResult circt::om::evaluator::EvaluatorValue::finalize | ( | ) |
Definition at line 44 of file Evaluator.cpp.
References assert().
|
inline |
|
inline |
Definition at line 55 of file Evaluator.h.
References ctx.
Referenced by circt::om::evaluator::ObjectValue::getField().
|
inline |
Definition at line 54 of file Evaluator.h.
References kind.
Referenced by circt::om::evaluator::ReferenceValue::classof(), circt::om::evaluator::AttributeValue::classof(), circt::om::evaluator::ListValue::classof(), circt::om::evaluator::ObjectValue::classof(), circt::om::evaluator::BasePathValue::classof(), and circt::om::evaluator::PathValue::classof().
|
inline |
Definition at line 90 of file Evaluator.h.
References loc.
| Type circt::om::evaluator::EvaluatorValue::getType | ( | ) | const |
Definition at line 57 of file Evaluator.cpp.
|
inline |
Definition at line 59 of file Evaluator.h.
References fullyEvaluated.
Referenced by circt::om::Evaluator::evaluateListConcat().
|
inline |
Return true if the value is unknown (has unknown in its fan-in).
A value is unknown if it depends on an UnknownValueOp or if any of its inputs are unknown. Unknown values propagate through operations.
Definition at line 68 of file Evaluator.h.
References unknown.
Referenced by circt::om::operator<<().
|
inline |
Definition at line 60 of file Evaluator.h.
References assert(), and fullyEvaluated.
Referenced by circt::om::evaluator::AttributeValue::AttributeValue(), circt::om::evaluator::PathValue::getEmptyPath(), circt::om::evaluator::ListValue::ListValue(), markUnknown(), circt::om::evaluator::ObjectValue::ObjectValue(), circt::om::evaluator::ListValue::setElements(), circt::om::evaluator::ObjectValue::setFields(), and circt::om::evaluator::ReferenceValue::setValue().
|
inline |
Mark this value as unknown.
This also marks the value as fully evaluated if it isn't already, since unknown values are considered fully evaluated. This maintains the invariant that unknown implies fullyEvaluated.
Definition at line 74 of file Evaluator.h.
References fullyEvaluated, markFullyEvaluated(), and unknown.
|
inline |
Definition at line 92 of file Evaluator.h.
References loc.
|
inline |
Definition at line 94 of file Evaluator.h.
References loc.
|
private |
Definition at line 101 of file Evaluator.h.
Referenced by getContext(), and getContext().
|
private |
Definition at line 104 of file Evaluator.h.
|
private |
Definition at line 103 of file Evaluator.h.
Referenced by isFullyEvaluated(), markFullyEvaluated(), and markUnknown().
|
private |
Definition at line 100 of file Evaluator.h.
Referenced by getKind().
|
private |
Definition at line 102 of file Evaluator.h.
Referenced by getLoc(), setLoc(), and setLocIfUnknown().
|
private |
Definition at line 105 of file Evaluator.h.
Referenced by isUnknown(), and markUnknown().