MLIR 22.0.0git
NVGPUToNVVM.h
Go to the documentation of this file.
1//===- NVGPUToNVVMPass.h - Convert NVGPU to NVVM 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_NVGPUTONVVM_NVGPUTONVVMPASS_H_
9#define MLIR_CONVERSION_NVGPUTONVVM_NVGPUTONVVMPASS_H_
10
11#include <memory>
12
13namespace mlir {
14
15class Attribute;
17class MLIRContext;
18class MemRefType;
19class Pass;
21class TypeConverter;
22
23#define GEN_PASS_DECL_CONVERTNVGPUTONVVMPASS
24#include "mlir/Conversion/Passes.h.inc"
25
26namespace nvgpu {
27class MBarrierGroupType;
28
29/// Returns the memory space attribute of the mbarrier object.
31 MBarrierGroupType barrierType);
32
33/// Return the memref type that can be used to represent an mbarrier object.
35 MBarrierGroupType barrierType);
36} // namespace nvgpu
37
38namespace nvgpu {
39/// Remap common GPU memory spaces (Workgroup, Private, etc) to LLVM address
40/// spaces.
42} // namespace nvgpu
43
44void populateNVGPUToNVVMConversionPatterns(const LLVMTypeConverter &converter,
45 RewritePatternSet &patterns);
46} // namespace mlir
47
48#endif // MLIR_CONVERSION_NVGPUTONVVM_NVGPUTONVVMPASS_H_
Attributes are known-constant values of operations.
Definition Attributes.h:25
Conversion from types to the LLVM IR dialect.
MLIRContext is the top-level object for a collection of MLIR operations.
Definition MLIRContext.h:63
The abstract base pass class.
Definition Pass.h:52
void populateCommonGPUTypeAndAttributeConversions(TypeConverter &typeConverter)
Remap common GPU memory spaces (Workgroup, Private, etc) to LLVM address spaces.
MemRefType getMBarrierMemrefType(MLIRContext *context, MBarrierGroupType barrierType)
Return the memref type that can be used to represent an mbarrier object.
Attribute getMbarrierMemorySpace(MLIRContext *context, MBarrierGroupType barrierType)
Returns the memory space attribute of the mbarrier object.
Include the generated interface declarations.
void populateNVGPUToNVVMConversionPatterns(const LLVMTypeConverter &converter, RewritePatternSet &patterns)
const FrozenRewritePatternSet & patterns