MLIR 22.0.0git
AMDGPUToROCDL.h
Go to the documentation of this file.
1//===- AMDGPUToROCDL.h - Convert AMDGPU to ROCDL dialect --*- C++ -*-===//
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#ifndef MLIR_CONVERSION_AMDGPUTOROCDL_AMDGPUTOROCDL_H_
9#define MLIR_CONVERSION_AMDGPUTOROCDL_AMDGPUTOROCDL_H_
10
12#include <memory>
13#include <string>
14
15namespace mlir {
16
19class TypeConverter;
20class Pass;
21
22#define GEN_PASS_DECL_CONVERTAMDGPUTOROCDLPASS
23#include "mlir/Conversion/Passes.h.inc"
24
25/// Note: This function will also add conversions for the AMDGPU-specific
26/// address spaces, but those can be added separately using
27/// populateAMDGPUMemorySpaceAttributeConversions().
28void populateAMDGPUToROCDLConversionPatterns(LLVMTypeConverter &converter,
29 RewritePatternSet &patterns,
30 amdgpu::Chipset chipset);
31
32/// Remap AMDGPU memory spaces to LLVM address spaces
33/// by mapping amdgpu::AddressSpace::fat_raw_buffer to ptr addrspace(7),
34/// amdgpu::AddressSpace::buffer_rsrc to ptr addrspace(8), and
35/// amdgpu::AddressSpace::fat_strided_buffer to ptr addrspace(9).
37 TypeConverter &typeConverter);
38
39} // namespace mlir
40
41#endif // MLIR_CONVERSION_AMDGPUTOROCDL_AMDGPUTOROCDL_H_
Conversion from types to the LLVM IR dialect.
The abstract base pass class.
Definition Pass.h:51
Include the generated interface declarations.
void populateAMDGPUMemorySpaceAttributeConversions(TypeConverter &typeConverter)
Remap AMDGPU memory spaces to LLVM address spaces by mapping amdgpu::AddressSpace::fat_raw_buffer to ...
const FrozenRewritePatternSet & patterns
void populateAMDGPUToROCDLConversionPatterns(LLVMTypeConverter &converter, RewritePatternSet &patterns, amdgpu::Chipset chipset)
Note: This function will also add conversions for the AMDGPU-specific address spaces,...