14#include "mlir/IR/BuiltinAttributeInterfaces.h"
15#include "mlir/IR/Location.h"
16#include "mlir/IR/SymbolTable.h"
17#include "llvm/ADT/TypeSwitch.h"
18#include "llvm/Support/Debug.h"
20#define DEBUG_TYPE "om-evaluator"
30 return cast<ModuleOp>(symbolTable.getOp());
33SmallVector<evaluator::EvaluatorValuePtr>
35 ArrayRef<Attribute> attributes) {
36 SmallVector<evaluator::EvaluatorValuePtr> values;
37 values.reserve(attributes.size());
38 for (
auto attr : attributes)
44 using namespace evaluator;
50 assert(isFullyEvaluated());
51 return llvm::TypeSwitch<EvaluatorValue *, LogicalResult>(
this)
57 return llvm::TypeSwitch<const EvaluatorValue *, Type>(
this)
58 .Case<
AttributeValue>([](
auto *attr) -> Type {
return attr->getType(); })
59 .Case<ObjectValue>([](
auto *
object) {
return object->getObjectType(); })
60 .Case<ListValue>([](
auto *list) {
return list->getListType(); })
61 .Case<ReferenceValue>([](
auto *ref) {
return ref->getValueType(); })
63 [
this](
auto *tuple) {
return FrozenBasePathType::get(ctx); })
65 [
this](
auto *tuple) {
return FrozenPathType::get(ctx); });
68FailureOr<evaluator::EvaluatorValuePtr>
72 return TypeSwitch<mlir::Type, FailureOr<evaluator::EvaluatorValuePtr>>(type)
73 .Case([&](circt::om::ListType type) {
75 std::make_shared<evaluator::ListValue>(type, loc);
76 return success(result);
78 .Case([&](circt::om::ClassType type)
79 -> FailureOr<evaluator::EvaluatorValuePtr> {
81 symbolTable.lookup<ClassOp>(type.getClassName().getValue());
83 return symbolTable.getOp()->emitError(
"unknown class name ")
84 << type.getClassName();
87 std::make_shared<evaluator::ObjectValue>(cls, loc);
89 return success(result);
91 .Default([&](
auto type) {
return failure(); });
96 auto it = objects.find({value, actualParams});
97 if (it != objects.end()) {
98 auto evalVal = it->second;
99 evalVal->setLocIfUnknown(loc);
103 FailureOr<evaluator::EvaluatorValuePtr> result =
104 TypeSwitch<Value, FailureOr<evaluator::EvaluatorValuePtr>>(value)
105 .Case([&](BlockArgument arg) {
106 auto val = (*actualParams)[arg.getArgNumber()];
110 .Case([&](OpResult result) {
111 return TypeSwitch<Operation *,
112 FailureOr<evaluator::EvaluatorValuePtr>>(
113 result.getDefiningOp())
114 .Case([&](ConstantOp op) {
115 return evaluateConstant(op, actualParams, loc);
117 .Case([&](IntegerBinaryArithmeticOp op) {
123 return success(result);
125 .Case<ObjectFieldOp>([&](
auto op) {
129 std::make_shared<evaluator::ReferenceValue>(
130 value.getType(), loc);
131 return success(result);
133 .Case<AnyCastOp>([&](AnyCastOp op) {
134 return getOrCreateValue(op.getInput(), actualParams, loc);
136 .Case<FrozenBasePathCreateOp>([&](FrozenBasePathCreateOp op) {
138 std::make_shared<evaluator::BasePathValue>(
139 op.getPathAttr(), loc);
140 return success(result);
142 .Case<FrozenPathCreateOp>([&](FrozenPathCreateOp op) {
144 std::make_shared<evaluator::PathValue>(
145 op.getTargetKindAttr(), op.getPathAttr(),
146 op.getModuleAttr(), op.getRefAttr(),
147 op.getFieldAttr(), loc);
148 return success(result);
150 .Case<FrozenEmptyPathOp>([&](FrozenEmptyPathOp op) {
152 std::make_shared<evaluator::PathValue>(
154 return success(result);
156 .Case<ListCreateOp, ListConcatOp, ObjectFieldOp>([&](
auto op) {
157 return getPartiallyEvaluatedValue(op.getType(), loc);
159 .Case<ObjectOp>([&](
auto op) {
160 return getPartiallyEvaluatedValue(op.getType(), op.getLoc());
162 .Default([&](Operation *op) {
163 auto error = op->emitError(
"unable to evaluate value");
164 error.attachNote() <<
"value: " << value;
171 objects[{value, actualParams}] = result.value();
175FailureOr<evaluator::EvaluatorValuePtr>
180 ClassOp cls = symbolTable.lookup<ClassOp>(className);
182 return symbolTable.getOp()->emitError(
"unknown class name ") << className;
184 auto formalParamNames = cls.getFormalParamNames().getAsRange<StringAttr>();
185 auto formalParamTypes = cls.getBodyBlock()->getArgumentTypes();
188 if (actualParams->size() != formalParamTypes.size()) {
189 auto error = cls.emitError(
"actual parameter list length (")
190 << actualParams->size() <<
") does not match formal "
191 <<
"parameter list length (" << formalParamTypes.size() <<
")";
192 auto &diag = error.attachNote() <<
"actual parameters: ";
195 for (
const auto ¶m : *actualParams) {
202 error.attachNote(cls.getLoc()) <<
"formal parameters: " << formalParamTypes;
207 for (
auto [actualParam, formalParamName, formalParamType] :
208 llvm::zip(*actualParams, formalParamNames, formalParamTypes)) {
209 if (!actualParam || !actualParam.get())
210 return cls.emitError(
"actual parameter for ")
211 << formalParamName <<
" is null";
214 if (isa<AnyType>(formalParamType))
217 Type actualParamType = actualParam->getType();
219 assert(actualParamType &&
"actualParamType must be non-null!");
221 if (actualParamType != formalParamType) {
222 auto error = cls.emitError(
"actual parameter for ")
223 << formalParamName <<
" has invalid type";
224 error.attachNote() <<
"actual parameter: " << *actualParam;
225 error.attachNote() <<
"format parameter type: " << formalParamType;
233 auto *context = cls.getContext();
234 for (
auto &op : cls.getOps())
235 for (
auto result : op.getResults()) {
239 getOrCreateValue(result, actualParams, UnknownLoc::get(context))))
242 worklist.push({result, actualParams});
245 auto fieldNames = cls.getFieldNames();
246 auto operands = cls.getFieldsOp()->getOperands();
247 for (
size_t i = 0; i < fieldNames.size(); ++i) {
248 auto name = fieldNames[i];
249 auto value = operands[i];
250 auto fieldLoc = cls.getFieldLocByIndex(i);
251 FailureOr<evaluator::EvaluatorValuePtr> result =
252 evaluateValue(value, actualParams, fieldLoc);
256 fields[cast<StringAttr>(name)] = result.value();
260 if (instanceKey.first) {
262 getOrCreateValue(instanceKey.first, instanceKey.second, loc).value();
263 auto *
object = llvm::cast<evaluator::ObjectValue>(result.get());
264 object->setFields(std::move(fields));
270 std::make_shared<evaluator::ObjectValue>(cls, fields, loc);
275FailureOr<std::shared_ptr<evaluator::EvaluatorValue>>
277 StringAttr className, ArrayRef<evaluator::EvaluatorValuePtr> actualParams) {
278 ClassOp cls = symbolTable.lookup<ClassOp>(className);
280 return symbolTable.getOp()->emitError(
"unknown class name ") << className;
283 std::make_unique<SmallVector<std::shared_ptr<evaluator::EvaluatorValue>>>(
286 actualParametersBuffers.push_back(std::move(parameters));
288 auto loc = cls.getLoc();
289 auto result = evaluateObjectInstance(
290 className, actualParametersBuffers.back().get(), loc);
297 while (!worklist.empty()) {
298 auto [value, args] = worklist.front();
301 auto result = evaluateValue(value, args, loc);
307 if (!result.value()->isFullyEvaluated())
308 worklist.push({value, args});
311 auto &
object = result.value();
314 if (failed(object->finalize()))
315 return cls.emitError() <<
"failed to finalize evaluation. Probably the "
316 "class contains a dataflow cycle";
320FailureOr<evaluator::EvaluatorValuePtr>
323 auto evaluatorValue = getOrCreateValue(value, actualParams, loc).value();
326 if (evaluatorValue->isFullyEvaluated())
327 return evaluatorValue;
329 return llvm::TypeSwitch<Value, FailureOr<evaluator::EvaluatorValuePtr>>(value)
330 .Case([&](BlockArgument arg) {
331 return evaluateParameter(arg, actualParams, loc);
333 .Case([&](OpResult result) {
334 return TypeSwitch<Operation *, FailureOr<evaluator::EvaluatorValuePtr>>(
335 result.getDefiningOp())
336 .Case([&](ConstantOp op) {
337 return evaluateConstant(op, actualParams, loc);
339 .Case([&](IntegerBinaryArithmeticOp op) {
340 return evaluateIntegerBinaryArithmetic(op, actualParams, loc);
342 .Case([&](ObjectOp op) {
343 return evaluateObjectInstance(op, actualParams);
345 .Case([&](ObjectFieldOp op) {
346 return evaluateObjectField(op, actualParams, loc);
348 .Case([&](ListCreateOp op) {
349 return evaluateListCreate(op, actualParams, loc);
351 .Case([&](ListConcatOp op) {
352 return evaluateListConcat(op, actualParams, loc);
354 .Case([&](AnyCastOp op) {
355 return evaluateValue(op.getInput(), actualParams, loc);
357 .Case([&](FrozenBasePathCreateOp op) {
358 return evaluateBasePathCreate(op, actualParams, loc);
360 .Case([&](FrozenPathCreateOp op) {
361 return evaluatePathCreate(op, actualParams, loc);
363 .Case([&](FrozenEmptyPathOp op) {
364 return evaluateEmptyPath(op, actualParams, loc);
366 .Default([&](Operation *op) {
367 auto error = op->emitError(
"unable to evaluate value");
368 error.attachNote() <<
"value: " << value;
377 auto val = (*actualParams)[formalParam.getArgNumber()];
383FailureOr<circt::om::evaluator::EvaluatorValuePtr>
392FailureOr<EvaluatorValuePtr>
394 IntegerBinaryArithmeticOp op,
ActualParameters actualParams, Location loc) {
396 auto handle = getOrCreateValue(op.getResult(), actualParams, loc);
399 if (handle.value()->isFullyEvaluated())
404 auto lhsResult = evaluateValue(op.getLhs(), actualParams, loc);
405 if (failed(lhsResult))
407 if (!lhsResult.value()->isFullyEvaluated())
410 auto rhsResult = evaluateValue(op.getRhs(), actualParams, loc);
411 if (failed(rhsResult))
413 if (!rhsResult.value()->isFullyEvaluated())
419 llvm::TypeSwitch<evaluator::EvaluatorValue *, om::IntegerAttr>(value)
421 return val->
getAs<om::IntegerAttr>();
424 return cast<evaluator::AttributeValue>(
425 val->getStrippedValue()->
get())
426 ->getAs<om::IntegerAttr>();
430 om::IntegerAttr lhs = extractAttr(lhsResult.value().get());
431 om::IntegerAttr rhs = extractAttr(rhsResult.value().get());
433 "expected om::IntegerAttr for IntegerBinaryArithmeticOp operands");
439 APSInt lhsVal = lhs.getValue().getAPSInt();
440 APSInt rhsVal = rhs.getValue().getAPSInt();
441 if (lhsVal.getBitWidth() > rhsVal.getBitWidth())
442 rhsVal = rhsVal.extend(lhsVal.getBitWidth());
443 else if (rhsVal.getBitWidth() > lhsVal.getBitWidth())
444 lhsVal = lhsVal.extend(rhsVal.getBitWidth());
447 FailureOr<APSInt> result = op.evaluateIntegerOperation(lhsVal, rhsVal);
450 return op->emitError(
"failed to evaluate integer operation");
453 MLIRContext *ctx = op->getContext();
455 om::IntegerAttr::get(ctx, mlir::IntegerAttr::get(ctx, result.value()));
458 auto *handleValue = cast<evaluator::AttributeValue>(handle.value().get());
459 auto resultStatus = handleValue->setAttr(resultAttr);
460 if (failed(resultStatus))
463 auto finalizeStatus = handleValue->finalize();
464 if (failed(finalizeStatus))
465 return finalizeStatus;
471FailureOr<circt::om::Evaluator::ActualParameters>
475 auto parameters = std::make_unique<
476 SmallVector<std::shared_ptr<evaluator::EvaluatorValue>>>();
479 for (
auto input : range) {
480 auto inputResult = getOrCreateValue(input, actualParams, loc);
481 if (failed(inputResult))
483 parameters->push_back(inputResult.value());
486 actualParametersBuffers.push_back(std::move(parameters));
487 return actualParametersBuffers.back().get();
491FailureOr<evaluator::EvaluatorValuePtr>
494 auto loc = op.getLoc();
495 if (isFullyEvaluated({op, actualParams}))
496 return getOrCreateValue(op, actualParams, loc);
499 createParametersFromOperands(op.getOperands(), actualParams, loc);
502 return evaluateObjectInstance(op.getClassNameAttr(), params.value(), loc,
507FailureOr<evaluator::EvaluatorValuePtr>
512 FailureOr<evaluator::EvaluatorValuePtr> currentObjectResult =
513 evaluateValue(op.getObject(), actualParams, loc);
514 if (failed(currentObjectResult))
515 return currentObjectResult;
517 auto *currentObject =
518 llvm::cast<evaluator::ObjectValue>(currentObjectResult.value().get());
520 auto objectFieldValue = getOrCreateValue(op, actualParams, loc).value();
525 for (
auto field : op.getFieldPath().getAsRange<FlatSymbolRefAttr>()) {
527 if (!currentObject->getFields().contains(field.getAttr()))
528 return objectFieldValue;
530 auto currentField = currentObject->getField(field.getAttr());
531 finalField = currentField.value();
532 if (
auto *nextObject =
533 llvm::dyn_cast<evaluator::ObjectValue>(finalField.get()))
534 currentObject = nextObject;
538 llvm::cast<evaluator::ReferenceValue>(objectFieldValue.get())
539 ->setValue(finalField);
542 return objectFieldValue;
546FailureOr<evaluator::EvaluatorValuePtr>
551 SmallVector<evaluator::EvaluatorValuePtr> values;
552 auto list = getOrCreateValue(op, actualParams, loc);
553 for (
auto operand : op.getOperands()) {
554 auto result = evaluateValue(operand, actualParams, loc);
557 if (!result.value()->isFullyEvaluated())
559 values.push_back(result.value());
563 llvm::cast<evaluator::ListValue>(list.value().get())
564 ->setElements(std::move(values));
569FailureOr<evaluator::EvaluatorValuePtr>
574 SmallVector<evaluator::EvaluatorValuePtr> values;
575 auto list = getOrCreateValue(op, actualParams, loc);
580 llvm::TypeSwitch<evaluator::EvaluatorValue *, evaluator::ListValue *>(
584 return cast<evaluator::ListValue>(val->getStrippedValue()->get());
588 for (
auto operand : op.getOperands()) {
589 auto result = evaluateValue(operand, actualParams, loc);
592 if (!result.value()->isFullyEvaluated())
601 for (
const auto &subValue : subList->
getElements())
602 values.push_back(subValue);
606 llvm::cast<evaluator::ListValue>(list.value().get())
607 ->setElements(std::move(values));
611FailureOr<evaluator::EvaluatorValuePtr>
616 auto valueResult = getOrCreateValue(op, actualParams, loc).value();
617 auto *path = llvm::cast<evaluator::BasePathValue>(valueResult.get());
618 auto result = evaluateValue(op.getBasePath(), actualParams, loc);
621 auto &value = result.value();
622 if (!value->isFullyEvaluated())
624 path->setBasepath(*llvm::cast<evaluator::BasePathValue>(value.get()));
628FailureOr<evaluator::EvaluatorValuePtr>
633 auto valueResult = getOrCreateValue(op, actualParams, loc).value();
634 auto *path = llvm::cast<evaluator::PathValue>(valueResult.get());
635 auto result = evaluateValue(op.getBasePath(), actualParams, loc);
638 auto &value = result.value();
639 if (!value->isFullyEvaluated())
641 path->setBasepath(*llvm::cast<evaluator::BasePathValue>(value.get()));
647 auto valueResult = getOrCreateValue(op, actualParams, loc).value();
656FailureOr<EvaluatorValuePtr>
658 auto field = fields.find(name);
659 if (field == fields.end())
660 return cls.emitError(
"field ") << name <<
" does not exist";
661 return success(fields[name]);
667 SmallVector<Attribute> fieldNames;
668 for (
auto &f : fields)
669 fieldNames.push_back(f.first);
671 llvm::sort(fieldNames, [](Attribute a, Attribute b) {
672 return cast<StringAttr>(a).getValue() < cast<StringAttr>(b).getValue();
675 return ArrayAttr::get(cls.getContext(), fieldNames);
679 for (
auto &&[e, value] : fields)
680 if (failed(finalizeEvaluatorValue(value)))
691 auto result = getStrippedValue();
694 value = std::move(result.value());
696 if (failed(finalizeEvaluatorValue(value)))
707 for (
auto &value : elements) {
708 if (failed(finalizeEvaluatorValue(value)))
720 path(PathAttr::get(context, {})) {
721 markFullyEvaluated();
725 :
EvaluatorValue(path.getContext(), Kind::BasePath, loc), path(path) {}
728 assert(isFullyEvaluated());
733 assert(!isFullyEvaluated());
734 auto newPath = llvm::to_vector(basepath.
path.getPath());
735 auto oldPath = path.getPath();
736 newPath.append(oldPath.begin(), oldPath.end());
737 path = PathAttr::get(path.getContext(), newPath);
738 markFullyEvaluated();
746 StringAttr module, StringAttr ref,
747 StringAttr field, Location loc)
749 path(path), module(module), ref(ref), field(field) {}
752 PathValue path(
nullptr,
nullptr,
nullptr,
nullptr,
nullptr, loc);
760 return StringAttr::get(getContext(),
"OMDeleted:");
761 SmallString<64> result;
762 switch (targetKind.getValue()) {
763 case TargetKind::DontTouch:
764 result +=
"OMDontTouchedReferenceTarget";
766 case TargetKind::Instance:
767 result +=
"OMInstanceTarget";
769 case TargetKind::MemberInstance:
770 result +=
"OMMemberInstanceTarget";
772 case TargetKind::MemberReference:
773 result +=
"OMMemberReferenceTarget";
775 case TargetKind::Reference:
776 result +=
"OMReferenceTarget";
780 if (!path.getPath().empty())
781 result += path.getPath().front().module;
783 result +=
module.getValue();
785 for (
const auto &elt : path) {
786 result += elt.module.getValue();
788 result += elt.instance.getValue();
791 if (!module.getValue().empty())
792 result += module.getValue();
793 if (!ref.getValue().empty()) {
795 result += ref.getValue();
797 if (!field.getValue().empty())
798 result += field.getValue();
799 return StringAttr::get(field.getContext(), result);
803 assert(!isFullyEvaluated());
804 auto newPath = llvm::to_vector(basepath.
getPath().getPath());
805 auto oldPath = path.getPath();
806 newPath.append(oldPath.begin(), oldPath.end());
807 path = PathAttr::get(path.getContext(), newPath);
808 markFullyEvaluated();
816 if (cast<TypedAttr>(attr).getType() != this->type)
817 return mlir::emitError(
getLoc(),
"cannot set AttributeValue of type ")
818 << this->type <<
" to Attribute " << attr;
819 if (isFullyEvaluated())
820 return mlir::emitError(
822 "cannot set AttributeValue that has already been fully evaluated");
824 markFullyEvaluated();
829 if (!isFullyEvaluated())
830 return mlir::emitError(
831 getLoc(),
"cannot finalize AttributeValue that is not fully evaluated");
835std::shared_ptr<evaluator::EvaluatorValue>
837 auto type = cast<TypedAttr>(attr).getType();
838 auto *context = type.getContext();
840 loc = UnknownLoc::get(context);
844 if (
auto listType = dyn_cast<circt::om::ListType>(type)) {
845 SmallVector<EvaluatorValuePtr> elements;
846 auto listAttr = cast<om::ListAttr>(attr);
848 listAttr.getContext(), listAttr.getElements().getValue());
849 elements.append(values.begin(), values.end());
850 auto list = std::make_shared<evaluator::ListValue>(listType, elements, loc);
854 return std::shared_ptr<AttributeValue>(
858std::shared_ptr<evaluator::EvaluatorValue>
860 auto *context = type.getContext();
862 loc = UnknownLoc::get(context);
866 if (
auto listType = dyn_cast<circt::om::ListType>(type))
867 return std::make_shared<evaluator::ListValue>(listType, loc);
869 return std::shared_ptr<AttributeValue>(
assert(baseType &&"element must be base type")
static Location getLoc(DefSlot slot)
std::shared_ptr< EvaluatorValue > EvaluatorValuePtr
A value of an object in memory.
SmallVector< EvaluatorValuePtr > getEvaluatorValuesFromAttributes(MLIRContext *context, ArrayRef< Attribute > attributes)
FailureOr< evaluator::EvaluatorValuePtr > evaluateBasePathCreate(FrozenBasePathCreateOp op, ActualParameters actualParams, Location loc)
FailureOr< evaluator::EvaluatorValuePtr > evaluateEmptyPath(FrozenEmptyPathOp op, ActualParameters actualParams, Location loc)
FailureOr< evaluator::EvaluatorValuePtr > getPartiallyEvaluatedValue(Type type, Location loc)
FailureOr< EvaluatorValuePtr > evaluateValue(Value value, ActualParameters actualParams, Location loc)
Evaluate a Value in a Class body according to the small expression grammar described in the rationale...
FailureOr< EvaluatorValuePtr > evaluateConstant(ConstantOp op, ActualParameters actualParams, Location loc)
Evaluator dispatch function for constants.
FailureOr< EvaluatorValuePtr > evaluateIntegerBinaryArithmetic(IntegerBinaryArithmeticOp op, ActualParameters actualParams, Location loc)
mlir::ModuleOp getModule()
Get the Module this Evaluator is built from.
FailureOr< EvaluatorValuePtr > evaluateObjectField(ObjectFieldOp op, ActualParameters actualParams, Location loc)
Evaluator dispatch function for Object fields.
Evaluator(ModuleOp mod)
Construct an Evaluator with an IR module.
FailureOr< evaluator::EvaluatorValuePtr > instantiate(StringAttr className, ArrayRef< EvaluatorValuePtr > actualParams)
Instantiate an Object with its class name and actual parameters.
FailureOr< EvaluatorValuePtr > getOrCreateValue(Value value, ActualParameters actualParams, Location loc)
SmallVectorImpl< std::shared_ptr< evaluator::EvaluatorValue > > * ActualParameters
FailureOr< EvaluatorValuePtr > evaluateListCreate(ListCreateOp op, ActualParameters actualParams, Location loc)
Evaluator dispatch function for List creation.
FailureOr< EvaluatorValuePtr > evaluateListConcat(ListConcatOp op, ActualParameters actualParams, Location loc)
Evaluator dispatch function for List concatenation.
std::pair< Value, ActualParameters > ObjectKey
FailureOr< EvaluatorValuePtr > evaluateParameter(BlockArgument formalParam, ActualParameters actualParams, Location loc)
Evaluator dispatch functions for the small expression grammar.
FailureOr< EvaluatorValuePtr > evaluateObjectInstance(StringAttr className, ActualParameters actualParams, Location loc, ObjectKey instanceKey={})
Instantiate an Object with its class name and actual parameters.
FailureOr< evaluator::EvaluatorValuePtr > evaluatePathCreate(FrozenPathCreateOp op, ActualParameters actualParams, Location loc)
FailureOr< ActualParameters > createParametersFromOperands(ValueRange range, ActualParameters actualParams, Location loc)
Evaluator dispatch function for Object instances.
Values which can be directly representable by MLIR attributes.
LogicalResult setAttr(Attribute attr)
LogicalResult finalizeImpl()
friend std::shared_ptr< EvaluatorValue > get(Attribute attr, LocationAttr loc)
static std::shared_ptr< EvaluatorValue > get(Attribute attr, LocationAttr loc={})
BasePathValue(MLIRContext *context)
void setBasepath(const BasePathValue &basepath)
Set the basepath which this path is relative to.
om::PathAttr getPath() const
Base class for evaluator runtime values.
bool isFullyEvaluated() const
void markFullyEvaluated()
A List which contains variadic length of elements with the same type.
const auto & getElements() const
LogicalResult finalizeImpl()
A composite Object, which has a type and fields.
LogicalResult finalizeImpl()
FailureOr< EvaluatorValuePtr > getField(StringAttr field)
Get a field of the Object by name.
ArrayAttr getFieldNames()
Get all the field names of the Object.
StringAttr getAsString() const
void setBasepath(const BasePathValue &basepath)
PathValue(om::TargetKindAttr targetKind, om::PathAttr path, StringAttr module, StringAttr ref, StringAttr field, Location loc)
Create a path value representing a regular path.
static PathValue getEmptyPath(Location loc)
Values which can be used as pointers to different values.
LogicalResult finalizeImpl()