LLVM 22.0.0git
NVPTXLowerArgs.cpp File Reference
#include "MCTargetDesc/NVPTXBaseInfo.h"
#include "NVPTX.h"
#include "NVPTXTargetMachine.h"
#include "NVPTXUtilities.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Analysis/PtrUseVisitor.h"
#include "llvm/Analysis/ValueTracking.h"
#include "llvm/CodeGen/TargetPassConfig.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/IntrinsicInst.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/IR/Type.h"
#include "llvm/InitializePasses.h"
#include "llvm/Pass.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/NVPTXAddrSpace.h"
#include <numeric>
#include <queue>

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "nvptx-lower-args"

Functions

 INITIALIZE_PASS_BEGIN (NVPTXLowerArgsLegacyPass, "nvptx-lower-args", "Lower arguments (NVPTX)", false, false) INITIALIZE_PASS_END(NVPTXLowerArgsLegacyPass
nvptx lower Lower arguments (NVPTX)"
nvptx lower Lower static false void convertToParamAS (Use *OldUse, Value *Param, bool HasCvtaParam, bool IsGridConstant)
static void adjustByValArgAlignment (Argument *Arg, Value *ArgInParamAS, const NVPTXTargetLowering *TLI)
static CallInstcreateNVVMInternalAddrspaceWrap (IRBuilder<> &IRB, Argument &Arg)
static void handleByValParam (const NVPTXTargetMachine &TM, Argument *Arg)
static void markPointerAsAS (Value *Ptr, const unsigned AS)
static void markPointerAsGlobal (Value *Ptr)
static bool runOnKernelFunction (const NVPTXTargetMachine &TM, Function &F)
static bool runOnDeviceFunction (const NVPTXTargetMachine &TM, Function &F)
static bool processFunction (Function &F, NVPTXTargetMachine &TM)
static bool copyFunctionByValArgs (Function &F)

Variables

nvptx lower args
nvptx lower Lower false

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "nvptx-lower-args"

Definition at line 160 of file NVPTXLowerArgs.cpp.

Function Documentation

◆ adjustByValArgAlignment()

◆ arguments()

nvptx lower Lower arguments ( NVPTX )

◆ convertToParamAS()

◆ copyFunctionByValArgs()

◆ createNVVMInternalAddrspaceWrap()

◆ handleByValParam()

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( NVPTXLowerArgsLegacyPass ,
"nvptx-lower-args" ,
"Lower arguments (NVPTX)" ,
false ,
false  )

◆ markPointerAsAS()

◆ markPointerAsGlobal()

void markPointerAsGlobal ( Value * Ptr)
static

Definition at line 635 of file NVPTXLowerArgs.cpp.

References llvm::NVPTXAS::ADDRESS_SPACE_GLOBAL, markPointerAsAS(), and Ptr.

Referenced by runOnKernelFunction().

◆ processFunction()

bool processFunction ( Function & F,
NVPTXTargetMachine & TM )
static

◆ runOnDeviceFunction()

◆ runOnKernelFunction()

Variable Documentation

◆ args

◆ false

nvptx lower Lower false

Definition at line 186 of file NVPTXLowerArgs.cpp.