CIRCT 22.0.0git
Loading...
Searching...
No Matches
CombDialect.cpp
Go to the documentation of this file.
1//===- CombDialect.cpp - Implement the Comb 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//
9// This file implements the Comb dialect.
10//
11//===----------------------------------------------------------------------===//
12
16#include "mlir/IR/Builders.h"
17#include "mlir/IR/BuiltinTypes.h"
18#include "mlir/IR/DialectImplementation.h"
19
20using namespace circt;
21using namespace comb;
22
23//===----------------------------------------------------------------------===//
24// Dialect specification.
25//===----------------------------------------------------------------------===//
26
27void CombDialect::initialize() {
28 // Register operations.
29 addOperations<
30#define GET_OP_LIST
31#include "circt/Dialect/Comb/Comb.cpp.inc"
32 >();
33}
34
35/// Registered hook to materialize a single constant operation from a given
36/// attribute value with the desired resultant type. This implementation
37/// delegates to the HW dialect's materializeConstant function. See the
38/// documentation in HWDialect for more information.
39Operation *CombDialect::materializeConstant(OpBuilder &builder, Attribute value,
40 Type type, Location loc) {
41 return hw::materializeConstant(builder, value, type, loc);
42}
43
44// Provide implementations for the enums we use.
45#include "circt/Dialect/Comb/CombEnums.cpp.inc"
46
47#include "circt/Dialect/Comb/CombDialect.cpp.inc"
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition comb.py:1