CIRCT 24.0.0git
Loading...
Searching...
No Matches
OM.cpp
Go to the documentation of this file.
1//===- OM.cpp - C interface for the OM dialect ----------------------------===//
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
13#include "mlir/CAPI/Registration.h"
14#include "mlir/CAPI/Wrap.h"
15#include "mlir/IR/Location.h"
16#include "llvm/ADT/Hashing.h"
17#include "llvm/Support/Casting.h"
18
19using namespace mlir;
20using namespace circt::om;
21
22//===----------------------------------------------------------------------===//
23// Dialect API.
24//===----------------------------------------------------------------------===//
25
27
28//===----------------------------------------------------------------------===//
29// Type API.
30//===----------------------------------------------------------------------===//
31
32/// Is the Type an AnyType.
33bool omTypeIsAAnyType(MlirType type) { return isa<AnyType>(unwrap(type)); }
34
35/// Get the TypeID for an AnyType.
36MlirTypeID omAnyTypeGetTypeID(void) { return wrap(AnyType::getTypeID()); }
37
38/// Is the Type a ClassType.
39bool omTypeIsAClassType(MlirType type) { return isa<ClassType>(unwrap(type)); }
40
41/// Get the TypeID for a ClassType.
42MlirTypeID omClassTypeGetTypeID() { return wrap(ClassType::getTypeID()); }
43
44/// Get the name for a ClassType.
45MlirIdentifier omClassTypeGetName(MlirType type) {
46 return wrap(cast<ClassType>(unwrap(type)).getClassName().getAttr());
47}
48
49/// Is the Type a FrozenBasePathType.
50bool omTypeIsAFrozenBasePathType(MlirType type) {
51 return isa<FrozenBasePathType>(unwrap(type));
52}
53
54/// Get the TypeID for a FrozenBasePathType.
56 return wrap(FrozenBasePathType::getTypeID());
57}
58
59/// Is the Type a FrozenPathType.
60bool omTypeIsAFrozenPathType(MlirType type) {
61 return isa<FrozenPathType>(unwrap(type));
62}
63
64/// Get the TypeID for a FrozenPathType.
65MlirTypeID omFrozenPathTypeGetTypeID(void) {
66 return wrap(FrozenPathType::getTypeID());
67}
68
69/// Is the Type a ListType.
70bool omTypeIsAListType(MlirType type) { return isa<ListType>(unwrap(type)); }
71
72/// Get the TypeID for a ListType.
73MlirTypeID omListTypeGetTypeID(void) { return wrap(ListType::getTypeID()); }
74
75// Return a element type of a ListType.
76MlirType omListTypeGetElementType(MlirType type) {
77 return wrap(cast<ListType>(unwrap(type)).getElementType());
78}
79
80/// Is the Type an OptionType.
81bool omTypeIsAOptionType(MlirType type) {
82 return isa<OptionType>(unwrap(type));
83}
84
85/// Get the TypeID for an OptionType.
86MlirTypeID omOptionTypeGetTypeID(void) { return wrap(OptionType::getTypeID()); }
87
88/// Get the element type of an OptionType.
89MlirType omOptionTypeGetElementType(MlirType type) {
90 return wrap(cast<OptionType>(unwrap(type)).getElementType());
91}
92
93/// Get an OptionType.
94MlirType omOptionTypeGet(MlirType elementType) {
95 return wrap(OptionType::get(unwrap(elementType)));
96}
97
98/// Is the Type a StringType.
99bool omTypeIsAStringType(MlirType type) {
100 return isa<StringType>(unwrap(type));
101}
102
103/// Get a StringType.
104MlirType omStringTypeGet(MlirContext ctx) {
105 return wrap(StringType::get(unwrap(ctx)));
106}
107
108/// Get the TypeID for a StringType.
109MlirTypeID omStringTypeGetTypeID(void) { return wrap(StringType::getTypeID()); }
110
111//===----------------------------------------------------------------------===//
112// Evaluator data structures.
113//===----------------------------------------------------------------------===//
114
116
117/// Define our own wrap and unwrap instead of using the usual macro. This is To
118/// handle the std::shared_ptr reference counts appropriately. We want to always
119/// create *new* shared pointers to the EvaluatorValue when we wrap it for C, to
120/// increment the reference count. We want to use the shared_from_this
121/// functionality to ensure it is unwrapped into C++ with the correct reference
122/// count.
123
125 return OMEvaluatorValue{
126 static_cast<void *>((new EvaluatorValuePtr(std::move(object)))->get())};
127}
128
130 return static_cast<evaluator::EvaluatorValue *>(c.ptr)->shared_from_this();
131}
132
133//===----------------------------------------------------------------------===//
134// Evaluator API.
135//===----------------------------------------------------------------------===//
136
137/// Construct an Evaluator with an IR module.
139 // Just allocate and wrap the Evaluator.
140 return wrap(new Evaluator(unwrap(mod)));
141}
142
143/// Use the Evaluator to Instantiate an Object from its class name and actual
144/// parameters.
146 MlirAttribute className,
147 intptr_t nActualParams,
148 OMEvaluatorValue *actualParams) {
149 // Unwrap the Evaluator.
150 Evaluator *cppEvaluator = unwrap(evaluator);
151
152 // Unwrap the className, which the client must supply as a StringAttr.
153 StringAttr cppClassName = cast<StringAttr>(unwrap(className));
154
155 // Unwrap the actual parameters.
156 SmallVector<std::shared_ptr<evaluator::EvaluatorValue>> cppActualParams;
157 for (unsigned i = 0; i < nActualParams; i++)
158 cppActualParams.push_back(unwrap(actualParams[i]));
159
160 // Invoke the Evaluator to instantiate the Object.
161 auto result = cppEvaluator->instantiate(cppClassName, cppActualParams);
162
163 // If instantiation failed, return a null Object. A Diagnostic will be emitted
164 // in this case.
165 if (failed(result))
166 return OMEvaluatorValue();
167
168 // Wrap and return the Object.
169 return wrap(result.value());
170}
171
172/// Get the Module the Evaluator is built from.
174 // Just unwrap the Evaluator, get the Module, and wrap it.
175 return wrap(unwrap(evaluator)->getModule());
176}
177
178//===----------------------------------------------------------------------===//
179// Object API.
180//===----------------------------------------------------------------------===//
181
182/// Query if the Object is null.
184 // Just check if the Object shared pointer is null.
185 return !object.ptr;
186}
187
188/// Get the Type from an Object, which will be a ClassType.
190 return wrap(llvm::cast<Object>(unwrap(object).get())->getType());
191}
192
193/// Get the hash for the object.
195 return llvm::hash_value(llvm::cast<Object>(unwrap(object).get()));
196}
197
198/// Check if two objects are same.
200 return llvm::cast<Object>(unwrap(object).get()) ==
201 llvm::cast<Object>(unwrap(other).get());
202}
203
204/// Get an ArrayAttr with the names of the fields in an Object.
206 return wrap(llvm::cast<Object>(unwrap(object).get())->getFieldNames());
207}
208
209/// Get a field from an Object, which must contain a field of that name.
211 MlirAttribute name) {
212 // Unwrap the Object and get the field of the name, which the client must
213 // supply as a StringAttr.
214 FailureOr<EvaluatorValuePtr> result =
215 llvm::cast<Object>(unwrap(object).get())
216 ->getField(cast<StringAttr>(unwrap(name)));
217
218 // If getField failed, return a null EvaluatorValue. A Diagnostic will be
219 // emitted in this case.
220 if (failed(result))
221 return OMEvaluatorValue();
222
223 return OMEvaluatorValue{wrap(result.value())};
224}
225
226//===----------------------------------------------------------------------===//
227// EvaluatorValue API.
228//===----------------------------------------------------------------------===//
229
230// Get a context from an EvaluatorValue.
231MlirContext omEvaluatorValueGetContext(OMEvaluatorValue evaluatorValue) {
232 return wrap(unwrap(evaluatorValue)->getContext());
233}
234
235// Get location from an EvaluatorValue.
236MlirLocation omEvaluatorValueGetLoc(OMEvaluatorValue evaluatorValue) {
237 return wrap(unwrap(evaluatorValue)->getLoc());
238}
239
240// Query if the EvaluatorValue is null.
242 // Check if the pointer is null.
243 return !evaluatorValue.ptr;
244}
245
246/// Query if the EvaluatorValue is an Object.
248 // Check if the Object is non-null.
249 return isa<evaluator::ObjectValue>(unwrap(evaluatorValue).get());
250}
251
252/// Query if the EvaluatorValue is a Primitive.
254 // Check if the Attribute is non-null.
255 return isa<evaluator::AttributeValue>(unwrap(evaluatorValue).get());
256}
257
258/// Get the Primitive from an EvaluatorValue, which must contain a Primitive.
259MlirAttribute omEvaluatorValueGetPrimitive(OMEvaluatorValue evaluatorValue) {
260 // Assert the Attribute is non-null, and return it.
261 assert(omEvaluatorValueIsAPrimitive(evaluatorValue));
262 return wrap(
263 llvm::cast<evaluator::AttributeValue>(unwrap(evaluatorValue).get())
264 ->getAttr());
265}
266
267/// Get the Primitive from an EvaluatorValue, which must contain a Primitive.
269 // Assert the Attribute is non-null, and return it.
270 return wrap(evaluator::AttributeValue::get(unwrap(primitive)));
271}
272
273/// Query if the EvaluatorValue is a List.
275 return isa<evaluator::ListValue>(unwrap(evaluatorValue).get());
276}
277
278/// Get the List from an EvaluatorValue, which must contain a List.
279/// TODO: This can be removed.
281 // Assert the List is non-null, and return it.
282 assert(omEvaluatorValueIsAList(evaluatorValue));
283 return evaluatorValue;
284}
285
286/// Get the length of the List.
288 return cast<evaluator::ListValue>(unwrap(evaluatorValue).get())
289 ->getElements()
290 .size();
291}
292
293/// Get an element of the List.
295 intptr_t pos) {
296 return wrap(cast<evaluator::ListValue>(unwrap(evaluatorValue).get())
297 ->getElements()[pos]);
298}
299
301 return isa<evaluator::OptionValue>(unwrap(evaluatorValue).get());
302}
303
305 auto type = cast<OptionType>(unwrap(optionType));
306 return wrap(std::make_shared<evaluator::OptionValue>(
307 type, nullptr, UnknownLoc::get(type.getContext())));
308}
309
311 OMEvaluatorValue payload) {
312 auto type = cast<OptionType>(unwrap(optionType));
313 return wrap(std::make_shared<evaluator::OptionValue>(
314 type, unwrap(payload), UnknownLoc::get(type.getContext())));
315}
316
318 return cast<evaluator::OptionValue>(unwrap(evaluatorValue).get())->hasValue();
319}
320
322 return wrap(
323 cast<evaluator::OptionValue>(unwrap(evaluatorValue).get())->getValue());
324}
325
327 return isa<evaluator::BasePathValue>(unwrap(evaluatorValue).get());
328}
329
331 return wrap(std::make_shared<evaluator::BasePathValue>(unwrap(context)));
332}
333
335 return isa<evaluator::PathValue>(unwrap(evaluatorValue).get());
336}
337
338MlirAttribute omEvaluatorPathGetAsString(OMEvaluatorValue evaluatorValue) {
339 const auto *path = cast<evaluator::PathValue>(unwrap(evaluatorValue).get());
340 return wrap((Attribute)path->getAsString());
341}
342
343/// Query if the EvaluatorValue is an Unknown value.
345 return unwrap(evaluatorValue)->isUnknown();
346}
347
348/// Create an Unknown EvaluatorValue.
349OMEvaluatorValue omEvaluatorUnknownGet(MlirContext context, MlirType type) {
350 auto *ctx = unwrap(context);
351 auto loc = UnknownLoc::get(ctx);
352 auto unknownValue =
353 evaluator::AttributeValue::get(unwrap(type), LocationAttr(loc));
354 unknownValue->markUnknown();
355 return wrap(unknownValue);
356}
357
358/// Get the type of an EvaluatorValue.
360 return wrap(unwrap(evaluatorValue)->getType());
361}
362
363//===----------------------------------------------------------------------===//
364// ReferenceAttr API.
365//===----------------------------------------------------------------------===//
366
367bool omAttrIsAReferenceAttr(MlirAttribute attr) {
368 return isa<ReferenceAttr>(unwrap(attr));
369}
370
371MlirAttribute omReferenceAttrGetInnerRef(MlirAttribute referenceAttr) {
372 return wrap(
373 (Attribute)cast<ReferenceAttr>(unwrap(referenceAttr)).getInnerRef());
374}
375
376//===----------------------------------------------------------------------===//
377// IntegerAttr API.
378//===----------------------------------------------------------------------===//
379
380bool omAttrIsAIntegerAttr(MlirAttribute attr) {
381 return isa<circt::om::IntegerAttr>(unwrap(attr));
382}
383
384MlirAttribute omIntegerAttrGetInt(MlirAttribute attr) {
385 return wrap(cast<circt::om::IntegerAttr>(unwrap(attr)).getValue());
386}
387
388MlirAttribute omIntegerAttrGet(MlirAttribute attr) {
389 auto integerAttr = cast<mlir::IntegerAttr>(unwrap(attr));
390 return wrap(
391 circt::om::IntegerAttr::get(integerAttr.getContext(), integerAttr));
392}
393
394/// Get a string representation of an om::IntegerAttr.
395MlirStringRef omIntegerAttrToString(MlirAttribute attr) {
396 mlir::IntegerAttr integerAttr =
397 cast<circt::om::IntegerAttr>(unwrap(attr)).getValue();
398 SmallVector<char> str;
399 integerAttr.getValue().toString(
400 str, /*Radix=*/10, /*Signed=*/integerAttr.getType().isSignedInteger());
401 return wrap(StringAttr::get(integerAttr.getContext(), str).getValue());
402}
403
404//===----------------------------------------------------------------------===//
405// ListAttr API.
406//===----------------------------------------------------------------------===//
407
408bool omAttrIsAListAttr(MlirAttribute attr) {
409 return isa<ListAttr>(unwrap(attr));
410}
411
412intptr_t omListAttrGetNumElements(MlirAttribute attr) {
413 auto listAttr = llvm::cast<ListAttr>(unwrap(attr));
414 return static_cast<intptr_t>(listAttr.getElements().size());
415}
416
417MlirAttribute omListAttrGetElement(MlirAttribute attr, intptr_t pos) {
418 auto listAttr = llvm::cast<ListAttr>(unwrap(attr));
419 return wrap(listAttr.getElements()[pos]);
420}
421
422MlirAttribute omListAttrGet(MlirType elementType, intptr_t numElements,
423 const MlirAttribute *elements) {
424 SmallVector<Attribute, 8> attrs;
425 (void)unwrapList(static_cast<size_t>(numElements), elements, attrs);
426 auto type = unwrap(elementType);
427 auto *ctx = type.getContext();
428 return wrap(ListAttr::get(ctx, type, ArrayAttr::get(ctx, attrs)));
429}
assert(baseType &&"element must be base type")
return wrap(CMemoryType::get(unwrap(ctx), baseType, numElements))
MlirType uint64_t numElements
Definition CHIRRTL.cpp:30
MlirType elementType
Definition CHIRRTL.cpp:29
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(CHIRRTL, chirrtl, circt::chirrtl::CHIRRTLDialect) MlirType chirrtlTypeGetCMemory(MlirContext ctx
static std::unique_ptr< Context > context
static Location getLoc(DefSlot slot)
Definition Mem2Reg.cpp:193
NamedAttrList attrs
bool omTypeIsAFrozenBasePathType(MlirType type)
Is the Type a FrozenBasePathType.
Definition OM.cpp:50
bool omEvaluatorValueIsABasePath(OMEvaluatorValue evaluatorValue)
Query if the EvaluatorValue is a BasePath.
Definition OM.cpp:326
bool omEvaluatorValueIsNull(OMEvaluatorValue evaluatorValue)
Definition OM.cpp:241
MlirContext omEvaluatorValueGetContext(OMEvaluatorValue evaluatorValue)
Definition OM.cpp:231
MlirTypeID omOptionTypeGetTypeID(void)
Get the TypeID for an OptionType.
Definition OM.cpp:86
MlirAttribute omReferenceAttrGetInnerRef(MlirAttribute referenceAttr)
Definition OM.cpp:371
bool omTypeIsAStringType(MlirType type)
Is the Type a StringType.
Definition OM.cpp:99
bool omEvaluatorOptionHasValue(OMEvaluatorValue evaluatorValue)
Query whether a fully evaluated, non-unknown Option is present.
Definition OM.cpp:317
static OMEvaluatorValue wrap(EvaluatorValuePtr object)
Define our own wrap and unwrap instead of using the usual macro.
Definition OM.cpp:124
MlirAttribute omEvaluatorPathGetAsString(OMEvaluatorValue evaluatorValue)
Get a string representation of a Path.
Definition OM.cpp:338
bool omEvaluatorValueIsAPath(OMEvaluatorValue evaluatorValue)
Query if the EvaluatorValue is a Path.
Definition OM.cpp:334
bool omEvaluatorValueIsAOption(OMEvaluatorValue evaluatorValue)
Query if the EvaluatorValue is an Option.
Definition OM.cpp:300
bool omAttrIsAListAttr(MlirAttribute attr)
Definition OM.cpp:408
OMEvaluatorValue omEvaluatorListGetElement(OMEvaluatorValue evaluatorValue, intptr_t pos)
Get an element of the List.
Definition OM.cpp:294
OMEvaluatorValue omEvaluatorValueFromPrimitive(MlirAttribute primitive)
Get the Primitive from an EvaluatorValue, which must contain a Primitive.
Definition OM.cpp:268
MlirStringRef omIntegerAttrToString(MlirAttribute attr)
Get a string representation of an om::IntegerAttr.
Definition OM.cpp:395
OMEvaluatorValue omEvaluatorInstantiate(OMEvaluator evaluator, MlirAttribute className, intptr_t nActualParams, OMEvaluatorValue *actualParams)
Use the Evaluator to Instantiate an Object from its class name and actual parameters.
Definition OM.cpp:145
intptr_t omListAttrGetNumElements(MlirAttribute attr)
Definition OM.cpp:412
MlirAttribute omEvaluatorObjectGetFieldNames(OMEvaluatorValue object)
Get an ArrayAttr with the names of the fields in an Object.
Definition OM.cpp:205
OMEvaluatorValue omEvaluatorOptionGetEmpty(MlirType optionType)
Create an empty Option. The type must be an OptionType.
Definition OM.cpp:304
bool omAttrIsAIntegerAttr(MlirAttribute attr)
Definition OM.cpp:380
OMEvaluatorValue omEvaluatorObjectGetField(OMEvaluatorValue object, MlirAttribute name)
Get a field from an Object, which must contain a field of that name.
Definition OM.cpp:210
MlirLocation omEvaluatorValueGetLoc(OMEvaluatorValue evaluatorValue)
Definition OM.cpp:236
OMEvaluatorValue omEvaluatorOptionGetValue(OMEvaluatorValue evaluatorValue)
Get the payload of a fully evaluated, non-unknown, present Option.
Definition OM.cpp:321
MlirTypeID omListTypeGetTypeID(void)
Get the TypeID for a ListType.
Definition OM.cpp:73
MlirTypeID omFrozenBasePathTypeGetTypeID(void)
Get the TypeID for a FrozenBasePathType.
Definition OM.cpp:55
MlirTypeID omStringTypeGetTypeID(void)
Get the TypeID for a StringType.
Definition OM.cpp:109
MlirType omStringTypeGet(MlirContext ctx)
Get a StringType.
Definition OM.cpp:104
bool omTypeIsAClassType(MlirType type)
Is the Type a ClassType.
Definition OM.cpp:39
MlirIdentifier omClassTypeGetName(MlirType type)
Get the name for a ClassType.
Definition OM.cpp:45
MlirType omOptionTypeGetElementType(MlirType type)
Get the element type of an OptionType.
Definition OM.cpp:89
bool omTypeIsAListType(MlirType type)
Is the Type a ListType.
Definition OM.cpp:70
intptr_t omEvaluatorListGetNumElements(OMEvaluatorValue evaluatorValue)
Get the length of the List.
Definition OM.cpp:287
MlirAttribute omListAttrGet(MlirType elementType, intptr_t numElements, const MlirAttribute *elements)
Definition OM.cpp:422
MlirAttribute omEvaluatorValueGetPrimitive(OMEvaluatorValue evaluatorValue)
Get the Primitive from an EvaluatorValue, which must contain a Primitive.
Definition OM.cpp:259
MlirType omOptionTypeGet(MlirType elementType)
Get an OptionType.
Definition OM.cpp:94
MlirAttribute omIntegerAttrGetInt(MlirAttribute attr)
Given an om::IntegerAttr, return the mlir::IntegerAttr.
Definition OM.cpp:384
bool omEvaluatorValueIsUnknown(OMEvaluatorValue evaluatorValue)
Query if the EvaluatorValue is an Unknown value.
Definition OM.cpp:344
bool omEvaluatorValueIsAList(OMEvaluatorValue evaluatorValue)
Query if the EvaluatorValue is a List.
Definition OM.cpp:274
bool omTypeIsAFrozenPathType(MlirType type)
Is the Type a FrozenPathType.
Definition OM.cpp:60
bool omEvaluatorValueIsAPrimitive(OMEvaluatorValue evaluatorValue)
Query if the EvaluatorValue is a Primitive.
Definition OM.cpp:253
bool omEvaluatorObjectIsNull(OMEvaluatorValue object)
Query if the Object is null.
Definition OM.cpp:183
MlirModule omEvaluatorGetModule(OMEvaluator evaluator)
Get the Module the Evaluator is built from.
Definition OM.cpp:173
bool omTypeIsAOptionType(MlirType type)
Is the Type an OptionType.
Definition OM.cpp:81
OMEvaluator omEvaluatorNew(MlirModule mod)
Construct an Evaluator with an IR module.
Definition OM.cpp:138
OMEvaluatorValue omEvaluatorBasePathGetEmpty(MlirContext context)
Create an empty BasePath.
Definition OM.cpp:330
MlirAttribute omListAttrGetElement(MlirAttribute attr, intptr_t pos)
Definition OM.cpp:417
MlirTypeID omAnyTypeGetTypeID(void)
Get the TypeID for an AnyType.
Definition OM.cpp:36
MlirTypeID omFrozenPathTypeGetTypeID(void)
Get the TypeID for a FrozenPathType.
Definition OM.cpp:65
OMEvaluatorValue omEvaluatorOptionGet(MlirType optionType, OMEvaluatorValue payload)
Create a present Option.
Definition OM.cpp:310
MlirType omEvaluatorObjectGetType(OMEvaluatorValue object)
Get the Type from an Object, which will be a ClassType.
Definition OM.cpp:189
OMEvaluatorValue omEvaluatorUnknownGet(MlirContext context, MlirType type)
Create an Unknown EvaluatorValue.
Definition OM.cpp:349
bool omAttrIsAReferenceAttr(MlirAttribute attr)
Definition OM.cpp:367
static EvaluatorValuePtr unwrap(OMEvaluatorValue c)
Definition OM.cpp:129
MlirAttribute omIntegerAttrGet(MlirAttribute attr)
Get an om::IntegerAttr from mlir::IntegerAttr.
Definition OM.cpp:388
OMEvaluatorValue omEvaluatorValueGetList(OMEvaluatorValue evaluatorValue)
Get the List from an EvaluatorValue, which must contain a List.
Definition OM.cpp:280
bool omEvaluatorValueIsAObject(OMEvaluatorValue evaluatorValue)
Query if the EvaluatorValue is an Object.
Definition OM.cpp:247
MlirType omListTypeGetElementType(MlirType type)
Definition OM.cpp:76
MlirTypeID omClassTypeGetTypeID()
Get the TypeID for a ClassType.
Definition OM.cpp:42
MlirType omEvaluatorValueGetType(OMEvaluatorValue evaluatorValue)
Get the type of an EvaluatorValue.
Definition OM.cpp:359
unsigned omEvaluatorObjectGetHash(OMEvaluatorValue object)
Get the hash for the object.
Definition OM.cpp:194
bool omEvaluatorObjectIsEq(OMEvaluatorValue object, OMEvaluatorValue other)
Check if two objects are same.
Definition OM.cpp:199
struct OMEvaluatorValue OMEvaluatorValue
Definition OM.h:109
MLIR_CAPI_EXPORTED bool omTypeIsAAnyType(MlirType type)
Is the Type an AnyType.
Definition OM.cpp:33
DEFINE_C_API_PTR_METHODS(SynthLongestPathHistory, llvm::ImmutableListImpl< DebugPoint >) llvm
Definition Synth.cpp:49
An Evaluator, which is constructed with an IR module and can instantiate Objects.
Definition Evaluator.h:343
FailureOr< evaluator::EvaluatorValuePtr > instantiate(StringAttr className, ArrayRef< EvaluatorValuePtr > actualParams)
Instantiate an Object with its class name and actual parameters.
static std::shared_ptr< EvaluatorValue > get(Attribute attr, LocationAttr loc={})
Base class for evaluator runtime values.
Definition Evaluator.h:47
evaluator::EvaluatorValuePtr EvaluatorValuePtr
Definition Evaluator.h:335
llvm::hash_code hash_value(const DenseSet< T > &set)
Definition om.py:1
A value type for use in C APIs that just wraps a pointer to an Object.
Definition OM.h:102
void * ptr
Definition OM.h:103
A value type for use in C APIs that just wraps a pointer to an Evaluator.
Definition OM.h:91