14#ifndef CLANG_CIR_LOWERING_DIRECTTOLLVM_LOWERTOLLVMOFFLOADPRINTF_H
15#define CLANG_CIR_LOWERING_DIRECTTOLLVM_LOWERTOLLVMOFFLOADPRINTF_H
17#include "mlir/IR/SymbolTable.h"
18#include "mlir/Interfaces/DataLayoutInterfaces.h"
19#include "mlir/Transforms/DialectConversion.h"
28 mlir::Value format, mlir::ValueRange args,
29 mlir::ConversionPatternRewriter &rewriter,
30 const mlir::DataLayout &dataLayout,
31 mlir::SymbolTableCollection &symbolTables);
37 mlir::ValueRange operands,
38 mlir::ConversionPatternRewriter &rewriter,
39 const mlir::DataLayout &dataLayout,
40 mlir::SymbolTableCollection &symbolTables,
41 unsigned genericAddrSpace,
52 mlir::SymbolTableCollection &symbolTables);
mlir::LogicalResult lowerAMDGPUPrintf(cir::OffloadPrintfOp op, mlir::ValueRange operands, mlir::ConversionPatternRewriter &rewriter, const mlir::DataLayout &dataLayout, mlir::SymbolTableCollection &symbolTables, unsigned genericAddrSpace, bool isBuffered)
Lowers op, whose lowered operands are operands, to the buffered printf runtime interface if isBuffere...
mlir::LogicalResult lowerNVPTXPrintf(cir::OffloadPrintfOp op, mlir::Value format, mlir::ValueRange args, mlir::ConversionPatternRewriter &rewriter, const mlir::DataLayout &dataLayout, mlir::SymbolTableCollection &symbolTables)
Lowers op, whose lowered format and arguments are format and args, to a call to vprintf.
bool isAMDGPUPrintfModule(mlir::ModuleOp module)
Whether module lowers device printf with the AMDGPU runtime interface: an AMDGCN triple,...
void annotateAMDGPUPrintfStrings(mlir::ModuleOp module, mlir::SymbolTableCollection &symbolTables)
Resolve constant format strings for AMDGPU printf ops while their producers are still CIR,...