LLVM 17.0.0git
Macros | Functions
AMDGPUEmitPrintf.cpp File Reference
#include "llvm/Transforms/Utils/AMDGPUEmitPrintf.h"
#include "llvm/ADT/SparseBitVector.h"
#include "llvm/Analysis/ValueTracking.h"

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "amdgpu-emit-printf"
 

Functions

static ValuefitArgInto64Bits (IRBuilder<> &Builder, Value *Arg)
 
static ValuecallPrintfBegin (IRBuilder<> &Builder, Value *Version)
 
static ValuecallAppendArgs (IRBuilder<> &Builder, Value *Desc, int NumArgs, Value *Arg0, Value *Arg1, Value *Arg2, Value *Arg3, Value *Arg4, Value *Arg5, Value *Arg6, bool IsLast)
 
static ValueappendArg (IRBuilder<> &Builder, Value *Desc, Value *Arg, bool IsLast)
 
static ValuegetStrlenWithNull (IRBuilder<> &Builder, Value *Str)
 
static ValuecallAppendStringN (IRBuilder<> &Builder, Value *Desc, Value *Str, Value *Length, bool isLast)
 
static ValueappendString (IRBuilder<> &Builder, Value *Desc, Value *Arg, bool IsLast)
 
static ValueprocessArg (IRBuilder<> &Builder, Value *Desc, Value *Arg, bool SpecIsCString, bool IsLast)
 
static void locateCStrings (SparseBitVector< 8 > &BV, Value *Fmt)
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "amdgpu-emit-printf"

Definition at line 23 of file AMDGPUEmitPrintf.cpp.

Function Documentation

◆ appendArg()

static Value * appendArg ( IRBuilder<> &  Builder,
Value Desc,
Value Arg,
bool  IsLast 
)
static

Definition at line 72 of file AMDGPUEmitPrintf.cpp.

References Arg, Builder, callAppendArgs(), and fitArgInto64Bits().

Referenced by processArg().

◆ appendString()

static Value * appendString ( IRBuilder<> &  Builder,
Value Desc,
Value Arg,
bool  IsLast 
)
static

◆ callAppendArgs()

static Value * callAppendArgs ( IRBuilder<> &  Builder,
Value Desc,
int  NumArgs,
Value Arg0,
Value Arg1,
Value Arg2,
Value Arg3,
Value Arg4,
Value Arg5,
Value Arg6,
bool  IsLast 
)
static

Definition at line 56 of file AMDGPUEmitPrintf.cpp.

References Builder, and Int32Ty.

Referenced by appendArg().

◆ callAppendStringN()

static Value * callAppendStringN ( IRBuilder<> &  Builder,
Value Desc,
Value Str,
Value Length,
bool  isLast 
)
static

Definition at line 149 of file AMDGPUEmitPrintf.cpp.

References Builder, Int32Ty, and llvm::Length.

Referenced by appendString().

◆ callPrintfBegin()

static Value * callPrintfBegin ( IRBuilder<> &  Builder,
Value Version 
)
static

Definition at line 49 of file AMDGPUEmitPrintf.cpp.

References Builder.

Referenced by llvm::emitAMDGPUPrintfCall().

◆ fitArgInto64Bits()

static Value * fitArgInto64Bits ( IRBuilder<> &  Builder,
Value Arg 
)
static

Definition at line 25 of file AMDGPUEmitPrintf.cpp.

References Arg, Builder, llvm::Type::DoubleTyID, and llvm_unreachable.

Referenced by appendArg().

◆ getStrlenWithNull()

static Value * getStrlenWithNull ( IRBuilder<> &  Builder,
Value Str 
)
static

◆ locateCStrings()

static void locateCStrings ( SparseBitVector< 8 > &  BV,
Value Fmt 
)
static

◆ processArg()

static Value * processArg ( IRBuilder<> &  Builder,
Value Desc,
Value Arg,
bool  SpecIsCString,
bool  IsLast 
)
static

Definition at line 169 of file AMDGPUEmitPrintf.cpp.

References appendArg(), appendString(), Arg, and Builder.

Referenced by llvm::emitAMDGPUPrintfCall().