Loading [MathJax]/extensions/tex2jax.js
CIRCT 22.0.0git
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Evaluator.h
Go to the documentation of this file.
1//===- Evaluator.h - Object Model dialect evaluator -----------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// This file contains the Object Model dialect declaration.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CIRCT_DIALECT_OM_EVALUATOR_EVALUATOR_H
14#define CIRCT_DIALECT_OM_EVALUATOR_EVALUATOR_H
15
17#include "circt/Support/LLVM.h"
18#include "mlir/IR/BuiltinOps.h"
19#include "mlir/IR/Diagnostics.h"
20#include "mlir/IR/Location.h"
21#include "mlir/IR/MLIRContext.h"
22#include "mlir/IR/SymbolTable.h"
23#include "mlir/Support/LogicalResult.h"
24#include "llvm/ADT/SmallPtrSet.h"
25#include "llvm/ADT/SmallString.h"
26
27#include <queue>
28#include <utility>
29
30namespace circt {
31namespace om {
32
33namespace evaluator {
34struct EvaluatorValue;
35
36/// A value of an object in memory. It is either a composite Object, or a
37/// primitive Attribute. Further refinement is expected.
38using EvaluatorValuePtr = std::shared_ptr<EvaluatorValue>;
39
40/// The fields of a composite Object, currently represented as a map. Further
41/// refinement is expected.
43
44/// Base class for evaluator runtime values.
45/// Enables the shared_from_this functionality so Evaluator Value pointers can
46/// be passed through the CAPI and unwrapped back into C++ smart pointers with
47/// the appropriate reference count.
48struct EvaluatorValue : std::enable_shared_from_this<EvaluatorValue> {
49 // Implement LLVM RTTI.
50 enum class Kind { Attr, Object, List, Reference, BasePath, Path };
51 EvaluatorValue(MLIRContext *ctx, Kind kind, Location loc)
52 : kind(kind), ctx(ctx), loc(loc) {}
53 Kind getKind() const { return kind; }
54 MLIRContext *getContext() const { return ctx; }
55
56 // Return true the value is fully evaluated.
57 bool isFullyEvaluated() const { return fullyEvaluated; }
59 assert(!fullyEvaluated && "should not mark twice");
60 fullyEvaluated = true;
61 }
62
63 /// Return the associated MLIR context.
64 MLIRContext *getContext() { return ctx; }
65
66 // Return a MLIR type which the value represents.
67 Type getType() const;
68
69 // Finalize the evaluator value. Strip intermidiate reference values.
70 LogicalResult finalize();
71
72 // Return the Location associated with the Value.
73 Location getLoc() const { return loc; }
74 // Set the Location associated with the Value.
75 void setLoc(Location l) { loc = l; }
76 // Set the Location, if it is unknown.
77 void setLocIfUnknown(Location l) {
78 if (isa<UnknownLoc>(loc))
79 loc = l;
80 }
81
82private:
83 const Kind kind;
84 MLIRContext *ctx;
85 Location loc;
86 bool fullyEvaluated = false;
87 bool finalized = false;
88};
89
90/// Values which can be used as pointers to different values.
91/// ReferenceValue is replaced with its element and erased at the end of
92/// evaluation.
94 ReferenceValue(Type type, Location loc)
96 type(type) {}
97
98 // Implement LLVM RTTI.
99 static bool classof(const EvaluatorValue *e) {
100 return e->getKind() == Kind::Reference;
101 }
102
103 Type getValueType() const { return type; }
104 EvaluatorValuePtr getValue() const { return value; }
106 value = std::move(newValue);
108 }
109
110 // Finalize the value.
111 LogicalResult finalizeImpl();
112
113 // Return the first non-reference value that is reachable from the reference.
114 FailureOr<EvaluatorValuePtr> getStrippedValue() const {
115 llvm::SmallPtrSet<ReferenceValue *, 4> visited;
116 auto currentValue = value;
117 while (auto *v = dyn_cast<ReferenceValue>(currentValue.get())) {
118 // Detect a cycle.
119 if (!visited.insert(v).second)
120 return failure();
121 currentValue = v->getValue();
122 }
123 return success(currentValue);
124 }
125
126private:
128 Type type;
129};
130
131/// Values which can be directly representable by MLIR attributes.
133 Attribute getAttr() const { return attr; }
134 template <typename AttrTy>
135 AttrTy getAs() const {
136 return dyn_cast<AttrTy>(attr);
137 }
138 static bool classof(const EvaluatorValue *e) {
139 return e->getKind() == Kind::Attr;
140 }
141
142 // Set Attribute for partially evaluated case.
143 LogicalResult setAttr(Attribute attr);
144
145 // Finalize the value.
146 LogicalResult finalizeImpl();
147
148 Type getType() const { return type; }
149
150 // Factory methods that create AttributeValue objects
151 static std::shared_ptr<EvaluatorValue> get(Attribute attr,
152 LocationAttr loc = {});
153 static std::shared_ptr<EvaluatorValue> get(Type type, LocationAttr loc = {});
154
155private:
156 // Make AttributeValue constructible only by the factory methods
157 struct PrivateTag {};
158
159 // Constructor that requires a PrivateTag
160 AttributeValue(PrivateTag, Attribute attr, Location loc)
162 type(cast<TypedAttr>(attr).getType()) {
164 }
165
166 // Constructor for partially evaluated AttributeValue
169
170 Attribute attr = {};
171 Type type;
172
173 // Friend declaration for the factory methods
174 friend std::shared_ptr<EvaluatorValue> get(Attribute attr, LocationAttr loc);
175 friend std::shared_ptr<EvaluatorValue> get(Type type, LocationAttr loc);
176};
177
178// This perform finalization to `value`.
179static inline LogicalResult finalizeEvaluatorValue(EvaluatorValuePtr &value) {
180 if (failed(value->finalize()))
181 return failure();
182 if (auto *ref = llvm::dyn_cast<ReferenceValue>(value.get())) {
183 auto v = ref->getStrippedValue();
184 if (failed(v))
185 return v;
186 value = v.value();
187 }
188 return success();
189}
190
191/// A List which contains variadic length of elements with the same type.
193 ListValue(om::ListType type, SmallVector<EvaluatorValuePtr> elements,
194 Location loc)
196 elements(std::move(elements)) {
198 }
199
200 void setElements(SmallVector<EvaluatorValuePtr> newElements) {
201 elements = std::move(newElements);
203 }
204
205 // Finalize the value.
206 LogicalResult finalizeImpl();
207
208 // Partially evaluated value.
209 ListValue(om::ListType type, Location loc)
211
212 const auto &getElements() const { return elements; }
213
214 /// Return the type of the value, which is a ListType.
215 om::ListType getListType() const { return type; }
216
217 /// Implement LLVM RTTI.
218 static bool classof(const EvaluatorValue *e) {
219 return e->getKind() == Kind::List;
220 }
221
222private:
223 om::ListType type;
224 SmallVector<EvaluatorValuePtr> elements;
225};
226
227/// A composite Object, which has a type and fields.
229 ObjectValue(om::ClassOp cls, ObjectFields fields, Location loc)
231 fields(std::move(fields)) {
233 }
234
235 // Partially evaluated value.
236 ObjectValue(om::ClassOp cls, Location loc)
238
239 om::ClassOp getClassOp() const { return cls; }
240 const auto &getFields() const { return fields; }
241
243 fields = std::move(newFields);
245 }
246
247 /// Return the type of the value, which is a ClassType.
248 om::ClassType getObjectType() const {
249 auto clsConst = const_cast<ClassOp &>(cls);
250 return ClassType::get(clsConst.getContext(),
251 FlatSymbolRefAttr::get(clsConst.getNameAttr()));
252 }
253
254 Type getType() const { return getObjectType(); }
255
256 /// Implement LLVM RTTI.
257 static bool classof(const EvaluatorValue *e) {
258 return e->getKind() == Kind::Object;
259 }
260
261 /// Get a field of the Object by name.
262 FailureOr<EvaluatorValuePtr> getField(StringAttr field);
263 FailureOr<EvaluatorValuePtr> getField(StringRef field) {
264 return getField(StringAttr::get(getContext(), field));
265 }
266
267 /// Get all the field names of the Object.
268 ArrayAttr getFieldNames();
269
270 // Finalize the evaluator value.
271 LogicalResult finalizeImpl();
272
273private:
274 om::ClassOp cls;
276};
277
278/// A Basepath value.
280 BasePathValue(MLIRContext *context);
281
282 /// Create a path value representing a basepath.
283 BasePathValue(om::PathAttr path, Location loc);
284
285 om::PathAttr getPath() const;
286
287 /// Set the basepath which this path is relative to.
288 void setBasepath(const BasePathValue &basepath);
289
290 /// Finalize the evaluator value.
291 LogicalResult finalizeImpl() { return success(); }
292
293 /// Implement LLVM RTTI.
294 static bool classof(const EvaluatorValue *e) {
295 return e->getKind() == Kind::BasePath;
296 }
297
298private:
299 om::PathAttr path;
300};
301
302/// A Path value.
304 /// Create a path value representing a regular path.
305 PathValue(om::TargetKindAttr targetKind, om::PathAttr path, StringAttr module,
306 StringAttr ref, StringAttr field, Location loc);
307
308 static PathValue getEmptyPath(Location loc);
309
310 om::TargetKindAttr getTargetKind() const { return targetKind; }
311
312 om::PathAttr getPath() const { return path; }
313
314 StringAttr getModule() const { return module; }
315
316 StringAttr getRef() const { return ref; }
317
318 StringAttr getField() const { return field; }
319
320 StringAttr getAsString() const;
321
322 void setBasepath(const BasePathValue &basepath);
323
324 // Finalize the evaluator value.
325 LogicalResult finalizeImpl() { return success(); }
326
327 /// Implement LLVM RTTI.
328 static bool classof(const EvaluatorValue *e) {
329 return e->getKind() == Kind::Path;
330 }
331
332private:
333 om::TargetKindAttr targetKind;
334 om::PathAttr path;
335 StringAttr module;
336 StringAttr ref;
337 StringAttr field;
338};
339
340} // namespace evaluator
341
344
345SmallVector<EvaluatorValuePtr>
346getEvaluatorValuesFromAttributes(MLIRContext *context,
347 ArrayRef<Attribute> attributes);
348
349/// An Evaluator, which is constructed with an IR module and can instantiate
350/// Objects. Further refinement is expected.
351struct Evaluator {
352 /// Construct an Evaluator with an IR module.
353 Evaluator(ModuleOp mod);
354
355 /// Instantiate an Object with its class name and actual parameters.
356 FailureOr<evaluator::EvaluatorValuePtr>
357 instantiate(StringAttr className, ArrayRef<EvaluatorValuePtr> actualParams);
358
359 /// Get the Module this Evaluator is built from.
360 mlir::ModuleOp getModule();
361
362 FailureOr<evaluator::EvaluatorValuePtr>
363 getPartiallyEvaluatedValue(Type type, Location loc);
364
366 SmallVectorImpl<std::shared_ptr<evaluator::EvaluatorValue>> *;
367
368 using ObjectKey = std::pair<Value, ActualParameters>;
369
370private:
371 bool isFullyEvaluated(Value value, ActualParameters key) {
372 return isFullyEvaluated({value, key});
373 }
374
376 auto val = objects.lookup(key);
377 return val && val->isFullyEvaluated();
378 }
379
380 FailureOr<EvaluatorValuePtr>
381 getOrCreateValue(Value value, ActualParameters actualParams, Location loc);
382 FailureOr<EvaluatorValuePtr>
383 allocateObjectInstance(StringAttr clasName, ActualParameters actualParams);
384
385 /// Evaluate a Value in a Class body according to the small expression grammar
386 /// described in the rationale document. The actual parameters are the values
387 /// supplied at the current instantiation of the Class being evaluated.
388 FailureOr<EvaluatorValuePtr>
389 evaluateValue(Value value, ActualParameters actualParams, Location loc);
390
391 /// Evaluator dispatch functions for the small expression grammar.
392 FailureOr<EvaluatorValuePtr> evaluateParameter(BlockArgument formalParam,
393 ActualParameters actualParams,
394 Location loc);
395
396 FailureOr<EvaluatorValuePtr>
397 evaluateConstant(ConstantOp op, ActualParameters actualParams, Location loc);
398
399 FailureOr<EvaluatorValuePtr>
400 evaluateIntegerBinaryArithmetic(IntegerBinaryArithmeticOp op,
401 ActualParameters actualParams, Location loc);
402
403 /// Instantiate an Object with its class name and actual parameters.
404 FailureOr<EvaluatorValuePtr>
405 evaluateObjectInstance(StringAttr className, ActualParameters actualParams,
406 Location loc, ObjectKey instanceKey = {});
407 FailureOr<EvaluatorValuePtr>
408 evaluateObjectInstance(ObjectOp op, ActualParameters actualParams);
409 FailureOr<EvaluatorValuePtr>
410 evaluateObjectField(ObjectFieldOp op, ActualParameters actualParams,
411 Location loc);
412 FailureOr<EvaluatorValuePtr> evaluateListCreate(ListCreateOp op,
413 ActualParameters actualParams,
414 Location loc);
415 FailureOr<EvaluatorValuePtr> evaluateListConcat(ListConcatOp op,
416 ActualParameters actualParams,
417 Location loc);
418 FailureOr<evaluator::EvaluatorValuePtr>
419 evaluateBasePathCreate(FrozenBasePathCreateOp op,
420 ActualParameters actualParams, Location loc);
421 FailureOr<evaluator::EvaluatorValuePtr>
422 evaluatePathCreate(FrozenPathCreateOp op, ActualParameters actualParams,
423 Location loc);
424 FailureOr<evaluator::EvaluatorValuePtr>
425 evaluateEmptyPath(FrozenEmptyPathOp op, ActualParameters actualParams,
426 Location loc);
427
428 FailureOr<ActualParameters>
429 createParametersFromOperands(ValueRange range, ActualParameters actualParams,
430 Location loc);
431
432 /// The symbol table for the IR module the Evaluator was constructed with.
433 /// Used to look up class definitions.
434 SymbolTable symbolTable;
435
436 /// This uniquely stores vectors that represent parameters.
437 SmallVector<
438 std::unique_ptr<SmallVector<std::shared_ptr<evaluator::EvaluatorValue>>>>
440
441 /// A worklist that tracks values which needs to be fully evaluated.
442 std::queue<ObjectKey> worklist;
443
444 /// Evaluator value storage. Return an evaluator value for the given
445 /// instantiation context (a pair of Value and parameters).
446 DenseMap<ObjectKey, std::shared_ptr<evaluator::EvaluatorValue>> objects;
447};
448
449/// Helper to enable printing objects in Diagnostics.
450static inline mlir::Diagnostic &
451operator<<(mlir::Diagnostic &diag,
452 const evaluator::EvaluatorValue &evaluatorValue) {
453 if (auto *attr = llvm::dyn_cast<evaluator::AttributeValue>(&evaluatorValue))
454 diag << attr->getAttr();
455 else if (auto *object =
456 llvm::dyn_cast<evaluator::ObjectValue>(&evaluatorValue))
457 diag << "Object(" << object->getType() << ")";
458 else if (auto *list = llvm::dyn_cast<evaluator::ListValue>(&evaluatorValue))
459 diag << "List(" << list->getType() << ")";
460 else if (llvm::isa<evaluator::BasePathValue>(&evaluatorValue))
461 diag << "BasePath()";
462 else if (llvm::isa<evaluator::PathValue>(&evaluatorValue))
463 diag << "Path()";
464 else
465 assert(false && "unhandled evaluator value");
466 return diag;
467}
468
469/// Helper to enable printing objects in Diagnostics.
470static inline mlir::Diagnostic &
471operator<<(mlir::Diagnostic &diag, const EvaluatorValuePtr &evaluatorValue) {
472 return diag << *evaluatorValue.get();
473}
474
475} // namespace om
476} // namespace circt
477
478#endif // CIRCT_DIALECT_OM_EVALUATOR_EVALUATOR_H
assert(baseType &&"element must be base type")
static LogicalResult finalizeEvaluatorValue(EvaluatorValuePtr &value)
Definition Evaluator.h:179
std::shared_ptr< EvaluatorValue > EvaluatorValuePtr
A value of an object in memory.
Definition Evaluator.h:38
evaluator::EvaluatorValuePtr EvaluatorValuePtr
Definition Evaluator.h:343
static mlir::Diagnostic & operator<<(mlir::Diagnostic &diag, const evaluator::EvaluatorValue &evaluatorValue)
Helper to enable printing objects in Diagnostics.
Definition Evaluator.h:451
SmallVector< EvaluatorValuePtr > getEvaluatorValuesFromAttributes(MLIRContext *context, ArrayRef< Attribute > attributes)
Definition Evaluator.cpp:34
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition om.py:1
An Evaluator, which is constructed with an IR module and can instantiate Objects.
Definition Evaluator.h:351
FailureOr< evaluator::EvaluatorValuePtr > evaluateBasePathCreate(FrozenBasePathCreateOp op, ActualParameters actualParams, Location loc)
FailureOr< evaluator::EvaluatorValuePtr > evaluateEmptyPath(FrozenEmptyPathOp op, ActualParameters actualParams, Location loc)
SymbolTable symbolTable
The symbol table for the IR module the Evaluator was constructed with.
Definition Evaluator.h:434
FailureOr< evaluator::EvaluatorValuePtr > getPartiallyEvaluatedValue(Type type, Location loc)
Definition Evaluator.cpp:69
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.
Definition Evaluator.cpp:29
FailureOr< EvaluatorValuePtr > evaluateObjectField(ObjectFieldOp op, ActualParameters actualParams, Location loc)
Evaluator dispatch function for Object fields.
SmallVector< std::unique_ptr< SmallVector< std::shared_ptr< evaluator::EvaluatorValue > > > > actualParametersBuffers
This uniquely stores vectors that represent parameters.
Definition Evaluator.h:439
bool isFullyEvaluated(Value value, ActualParameters key)
Definition Evaluator.h:371
FailureOr< EvaluatorValuePtr > allocateObjectInstance(StringAttr clasName, ActualParameters actualParams)
std::queue< ObjectKey > worklist
A worklist that tracks values which needs to be fully evaluated.
Definition Evaluator.h:442
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)
Definition Evaluator.cpp:94
SmallVectorImpl< std::shared_ptr< evaluator::EvaluatorValue > > * ActualParameters
Definition Evaluator.h:366
DenseMap< ObjectKey, std::shared_ptr< evaluator::EvaluatorValue > > objects
Evaluator value storage.
Definition Evaluator.h:446
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
Definition Evaluator.h:368
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.
bool isFullyEvaluated(ObjectKey key)
Definition Evaluator.h:375
Values which can be directly representable by MLIR attributes.
Definition Evaluator.h:132
LogicalResult setAttr(Attribute attr)
friend std::shared_ptr< EvaluatorValue > get(Attribute attr, LocationAttr loc)
static bool classof(const EvaluatorValue *e)
Definition Evaluator.h:138
AttributeValue(PrivateTag, Attribute attr, Location loc)
Definition Evaluator.h:160
friend std::shared_ptr< EvaluatorValue > get(Type type, LocationAttr loc)
AttributeValue(PrivateTag, Type type, Location loc)
Definition Evaluator.h:167
static bool classof(const EvaluatorValue *e)
Implement LLVM RTTI.
Definition Evaluator.h:294
LogicalResult finalizeImpl()
Finalize the evaluator value.
Definition Evaluator.h:291
void setBasepath(const BasePathValue &basepath)
Set the basepath which this path is relative to.
BasePathValue(om::PathAttr path, Location loc)
Create a path value representing a basepath.
Base class for evaluator runtime values.
Definition Evaluator.h:48
EvaluatorValue(MLIRContext *ctx, Kind kind, Location loc)
Definition Evaluator.h:51
MLIRContext * getContext()
Return the associated MLIR context.
Definition Evaluator.h:64
MLIRContext * getContext() const
Definition Evaluator.h:54
A List which contains variadic length of elements with the same type.
Definition Evaluator.h:192
static bool classof(const EvaluatorValue *e)
Implement LLVM RTTI.
Definition Evaluator.h:218
const auto & getElements() const
Definition Evaluator.h:212
ListValue(om::ListType type, Location loc)
Definition Evaluator.h:209
void setElements(SmallVector< EvaluatorValuePtr > newElements)
Definition Evaluator.h:200
SmallVector< EvaluatorValuePtr > elements
Definition Evaluator.h:224
ListValue(om::ListType type, SmallVector< EvaluatorValuePtr > elements, Location loc)
Definition Evaluator.h:193
om::ListType getListType() const
Return the type of the value, which is a ListType.
Definition Evaluator.h:215
A composite Object, which has a type and fields.
Definition Evaluator.h:228
om::ClassType getObjectType() const
Return the type of the value, which is a ClassType.
Definition Evaluator.h:248
FailureOr< EvaluatorValuePtr > getField(StringAttr field)
Get a field of the Object by name.
const auto & getFields() const
Definition Evaluator.h:240
ObjectValue(om::ClassOp cls, ObjectFields fields, Location loc)
Definition Evaluator.h:229
FailureOr< EvaluatorValuePtr > getField(StringRef field)
Definition Evaluator.h:263
ObjectValue(om::ClassOp cls, Location loc)
Definition Evaluator.h:236
ArrayAttr getFieldNames()
Get all the field names of the Object.
static bool classof(const EvaluatorValue *e)
Implement LLVM RTTI.
Definition Evaluator.h:257
void setFields(llvm::SmallDenseMap< StringAttr, EvaluatorValuePtr > newFields)
Definition Evaluator.h:242
om::ClassOp getClassOp() const
Definition Evaluator.h:239
llvm::SmallDenseMap< StringAttr, EvaluatorValuePtr > fields
Definition Evaluator.h:275
StringAttr getModule() const
Definition Evaluator.h:314
StringAttr StringAttr ref
Definition Evaluator.h:336
StringAttr getAsString() const
om::TargetKindAttr getTargetKind() const
Definition Evaluator.h:310
StringAttr getField() const
Definition Evaluator.h:318
om::TargetKindAttr targetKind
Definition Evaluator.h:333
void setBasepath(const BasePathValue &basepath)
om::PathAttr getPath() const
Definition Evaluator.h:312
static bool classof(const EvaluatorValue *e)
Implement LLVM RTTI.
Definition Evaluator.h:328
static PathValue getEmptyPath(Location loc)
StringAttr getRef() const
Definition Evaluator.h:316
Values which can be used as pointers to different values.
Definition Evaluator.h:93
EvaluatorValuePtr getValue() const
Definition Evaluator.h:104
static bool classof(const EvaluatorValue *e)
Definition Evaluator.h:99
ReferenceValue(Type type, Location loc)
Definition Evaluator.h:94
FailureOr< EvaluatorValuePtr > getStrippedValue() const
Definition Evaluator.h:114
void setValue(EvaluatorValuePtr newValue)
Definition Evaluator.h:105