MLIR 23.0.0git
AMDGPUDialect.cpp
Go to the documentation of this file.
1//===- AMDGPUDialect.cpp - MLIR AMDGPU dialect implementation --------===//
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 AMDGPU dialect and its operations.
10//
11//===----------------------------------------------------------------------===//
12
14
21
22using namespace mlir;
23using namespace mlir::amdgpu;
24
25#include "mlir/Dialect/AMDGPU/IR/AMDGPUDialect.cpp.inc"
26
27namespace {
28struct AMDGPUInlinerInterface final : DialectInlinerInterface {
29 using DialectInlinerInterface::DialectInlinerInterface;
30 bool isLegalToInline(Operation *, Region *, bool, IRMapping &) const final {
31 return true;
32 }
33};
34} // namespace
35
36void AMDGPUDialect::initialize() {
37 addOperations<
38#define GET_OP_LIST
39#include "mlir/Dialect/AMDGPU/IR/AMDGPU.cpp.inc"
40 >();
41 registerTypes();
42 registerAttributes();
43 addInterfaces<AMDGPUInlinerInterface>();
44}
static bool isLegalToInline(InlinerInterface &interface, Region *src, Region *insertRegion, bool shouldCloneInlinedRegion, IRMapping &valueMapping)
Utility to check that all of the operations within 'src' can be inlined.
Include the generated interface declarations.