CIRCT 24.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
27/// Registered hook to materialize a single constant operation from a given
28/// attribute value with the desired resultant type. This implementation
29/// delegates to the HW dialect's materializeConstant function. See the
30/// documentation in HWDialect for more information.
31Operation *CombDialect::materializeConstant(OpBuilder &builder, Attribute value,
32 Type type, Location loc) {
33 return hw::materializeConstant(builder, value, type, loc);
34}
35
36// Provide implementations for the enums we use.
37#include "circt/Dialect/Comb/CombEnums.cpp.inc"
38
39#include "circt/Dialect/Comb/CombDialect.cpp.inc"
Operation * materializeConstant(OpBuilder &builder, Attribute value, Type type, Location loc)
HW dialect constant materialization commonly used by other dialects as well.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition comb.py:1