MLIR 24.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 addInterfaces<AMDGPUInlinerInterface>();
38 declarePromisedInterfaces<
39 memref::IndexedAccessOpInterface, TransposeLoadOp, GlobalTransposeLoadOp,
40 MakeDmaDescriptorOp, MakeGatherDmaDescriptorOp, DsBarrierInitOp,
41 DsBarrierPollStateOp, DsAsyncBarrierArriveOp, DsBarrierArriveOp>();
42 declarePromisedInterfaces<memref::IndexedMemCopyOpInterface, GatherToLDSOp,
43 GlobalLoadAsyncToLDSOp, MakeDmaBaseOp,
44 MakeGatherDmaBaseOp>();
45}
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.