clang 24.0.0git
LowerToLLVMOffloadPrintfAMDGPU.cpp File Reference
#include "LowerToLLVM.h"
#include "LowerToLLVMOffloadPrintf.h"
#include "mlir/Dialect/LLVMIR/LLVMArithOps.h"
#include "mlir/Dialect/LLVMIR/LLVMCallOps.h"
#include "mlir/Dialect/LLVMIR/LLVMConstantOps.h"
#include "mlir/Dialect/LLVMIR/LLVMConversionOps.h"
#include "mlir/Dialect/LLVMIR/LLVMMemoryIntrinsicOps.h"
#include "mlir/Dialect/LLVMIR/LLVMMemoryOps.h"
#include "mlir/Dialect/LLVMIR/LLVMModuleOps.h"
#include "mlir/Dialect/LLVMIR/LLVMTerminatorOps.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Matchers.h"
#include "clang/CIR/Dialect/IR/CIRDialect.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SparseBitVector.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/TargetParser/Triple.h"
#include "llvm/Transforms/Utils/AMDGPUEmitPrintf.h"

Go to the source code of this file.

Namespaces

namespace  cir
namespace  cir::direct

Functions

bool cir::direct::isAMDGPUPrintfModule (mlir::ModuleOp module)
 Whether module lowers device printf with the AMDGPU runtime interface: an AMDGCN triple, or SPIR-V with the AMD vendor.
void cir::direct::annotateAMDGPUPrintfStrings (mlir::ModuleOp module, mlir::SymbolTableCollection &symbolTables)
 Resolve constant format strings for AMDGPU printf ops while their producers are still CIR, recording one string per operand on each op for the lowering to read.
mlir::LogicalResult cir::direct::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 isBuffered and to hostcall printf otherwise.