clang 24.0.0git
LowerToLLVMOpenCLMetadata.h
Go to the documentation of this file.
1//===- LowerToLLVMOpenCLMetadata.h - OpenCL metadata lowering ---*- 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
9#ifndef CLANG_CIR_LOWERING_DIRECTTOLLVM_LOWERTOLLVMOPENCLMETADATA_H
10#define CLANG_CIR_LOWERING_DIRECTTOLLVM_LOWERTOLLVMOPENCLMETADATA_H
11
12#include "mlir/IR/BuiltinOps.h"
13#include "mlir/IR/MLIRContext.h"
14#include "mlir/IR/OperationSupport.h"
16#include "llvm/ADT/SmallVector.h"
17
18namespace cir {
19namespace direct {
20
22public:
23 OpenCLFunctionMetadataLowering(mlir::MLIRContext *ctx);
24
25 bool lower(mlir::NamedAttribute attr, bool includeFunctionOnlyAttrs);
27
28private:
29 void lower(cir::OpenCLKernelArgMetadataAttr clArgMetadata);
30
31 mlir::MLIRContext *ctx;
33};
34
35} // namespace direct
36} // namespace cir
37
38#endif // CLANG_CIR_LOWERING_DIRECTTOLLVM_LOWERTOLLVMOPENCLMETADATA_H
void appendAttrs(llvm::SmallVectorImpl< mlir::NamedAttribute > &result) const
bool lower(mlir::NamedAttribute attr, bool includeFunctionOnlyAttrs)