MLIR
23.0.0git
lib
Dialect
AMDGPU
IR
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
13
#include "
mlir/Dialect/AMDGPU/IR/AMDGPUDialect.h
"
14
15
#include "
mlir/Dialect/Arith/IR/Arith.h
"
16
#include "
mlir/Dialect/GPU/IR/GPUDialect.h
"
17
#include "
mlir/Dialect/LLVMIR/ROCDLDialect.h
"
18
#include "
mlir/IR/BuiltinTypes.h
"
19
#include "
mlir/IR/DialectImplementation.h
"
20
#include "
mlir/Transforms/InliningUtils.h
"
21
22
using namespace
mlir
;
23
using namespace
mlir::amdgpu
;
24
25
#include "mlir/Dialect/AMDGPU/IR/AMDGPUDialect.cpp.inc"
26
27
namespace
{
28
struct
AMDGPUInlinerInterface final : DialectInlinerInterface {
29
using
DialectInlinerInterface::DialectInlinerInterface;
30
bool
isLegalToInline
(Operation *, Region *,
bool
, IRMapping &)
const
final
{
31
return
true
;
32
}
33
};
34
}
// namespace
35
36
void
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
}
AMDGPUDialect.h
DialectImplementation.h
GPUDialect.h
isLegalToInline
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.
Definition
InliningUtils.cpp:182
InliningUtils.h
ROCDLDialect.h
Arith.h
BuiltinTypes.h
mlir::amdgpu
Definition
AMDGPUToROCDL.h:32
mlir
Include the generated interface declarations.
Definition
AliasAnalysis.h:19
Generated on
for MLIR by
1.14.0