CIRCT  20.0.0git
MSFTDialect.cpp
Go to the documentation of this file.
1 //===- MSFTDialect.cpp - Implement the MSFT 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 MSFT dialect.
10 //
11 //===----------------------------------------------------------------------===//
12 
15 
16 #include "mlir/IR/Builders.h"
17 #include "mlir/IR/BuiltinTypes.h"
18 #include "mlir/IR/DialectImplementation.h"
19 
20 using namespace circt;
21 using namespace msft;
22 
23 //===----------------------------------------------------------------------===//
24 // Dialect specification.
25 //===----------------------------------------------------------------------===//
26 
27 void MSFTDialect::initialize() {
28  addOperations<
29 #define GET_OP_LIST
30 #include "circt/Dialect/MSFT/MSFT.cpp.inc"
31  >();
32  registerAttributes();
33 }
34 
35 /// Registered hook to materialize a single constant operation from a given
36 /// attribute value with the desired resultant type. This method should use
37 /// the provided builder to create the operation without changing the
38 /// insertion position. The generated operation is expected to be constant
39 /// like, i.e. single result, zero operands, non side-effecting, etc. On
40 /// success, this hook should return the value generated to represent the
41 /// constant value. Otherwise, it should return null on failure.
42 Operation *MSFTDialect::materializeConstant(OpBuilder &builder, Attribute value,
43  Type type, Location loc) {
44  // Placeholder
45  return nullptr;
46 }
47 
48 #include "circt/Dialect/MSFT/MSFTDialect.cpp.inc"
49 #include "circt/Dialect/MSFT/MSFTEnums.cpp.inc"
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Definition: DebugAnalysis.h:21
Definition: msft.py:1