CIRCT  20.0.0git
RTGTest.cpp
Go to the documentation of this file.
1 //===- RTGTest.cpp - C interface for the RTGTest 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 
12 
13 #include "mlir/CAPI/Registration.h"
14 
15 using namespace circt;
16 using namespace circt::rtgtest;
17 
18 //===----------------------------------------------------------------------===//
19 // Dialect API.
20 //===----------------------------------------------------------------------===//
21 
22 MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(RTGTest, rtgtest, RTGTestDialect)
23 
24 //===----------------------------------------------------------------------===//
25 // Type API.
26 //===----------------------------------------------------------------------===//
27 
28 bool rtgtestTypeIsACPU(MlirType type) { return isa<CPUType>(unwrap(type)); }
29 
30 MlirType rtgtestCPUTypeGet(MlirContext ctxt) {
31  return wrap(CPUType::get(unwrap(ctxt)));
32 }
return wrap(CMemoryType::get(unwrap(ctx), baseType, numElements))
MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(CHIRRTL, chirrtl, circt::chirrtl::CHIRRTLDialect) MlirType chirrtlTypeGetCMemory(MlirContext ctx
static EvaluatorValuePtr unwrap(OMEvaluatorValue c)
Definition: OM.cpp:113
bool rtgtestTypeIsACPU(MlirType type)
If the type is an RTGTest CPUType.
Definition: RTGTest.cpp:28
MlirType rtgtestCPUTypeGet(MlirContext ctxt)
Creates an RTGTest CPU type in the context.
Definition: RTGTest.cpp:30
Direction get(bool isOutput)
Returns an output direction if isOutput is true, otherwise returns an input direction.
Definition: CalyxOps.cpp:55
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21