LLVM  14.0.0git
Namespaces | Macros | Functions | Variables
NVVMIntrRange.cpp File Reference
#include "NVPTX.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/IR/PassManager.h"
#include "llvm/Support/CommandLine.h"
Include dependency graph for NVVMIntrRange.cpp:

Go to the source code of this file.

Namespaces

 llvm
 This is an optimization pass for GlobalISel generic memory operations.
 

Macros

#define DEBUG_TYPE   "nvvm-intr-range"
 

Functions

void llvm::initializeNVVMIntrRangePass (PassRegistry &)
 
 INITIALIZE_PASS (NVVMIntrRange, "nvvm-intr-range", "Add !range metadata to NVVM intrinsics.", false, false) static bool addRangeMetadata(uint64_t Low
 
C setMetadata (LLVMContext::MD_range, MDNode::get(Context, LowAndHigh))
 
static bool runNVVMIntrRange (Function &F, unsigned SmVersion)
 

Variables

static cl::opt< unsigned > NVVMIntrRangeSM ("nvvm-intr-range-sm", cl::init(20), cl::Hidden, cl::desc("SM variant"))
 
uint64_t High
 
uint64_t CallInstC
 
LLVMContextContext = C->getParent()->getContext()
 
IntegerTypeInt32Ty = Type::getInt32Ty(Context)
 
MetadataLowAndHigh []
 
return true
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "nvvm-intr-range"

Definition at line 25 of file NVVMIntrRange.cpp.

Function Documentation

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( NVVMIntrRange  ,
"nvvm-intr-range"  ,
"Add !range metadata to NVVM intrinsics."  ,
false  ,
false   
)

◆ runNVVMIntrRange()

static bool runNVVMIntrRange ( Function F,
unsigned  SmVersion 
)
static

Definition at line 75 of file NVVMIntrRange.cpp.

References Callee, F, I, llvm::instructions(), SmVersion, x, y, and z.

Referenced by llvm::NVVMIntrRangePass::run().

◆ setMetadata()

C setMetadata ( LLVMContext::MD_range  ,
MDNode::get(Context, LowAndHigh  
)

Variable Documentation

◆ C

Initial value:
{
if (C->getMetadata(LLVMContext::MD_range))
return false

Definition at line 61 of file NVVMIntrRange.cpp.

◆ Context

LLVMContext& Context = C->getParent()->getContext()

Definition at line 66 of file NVVMIntrRange.cpp.

◆ High

uint64_t High

◆ Int32Ty

IntegerType* Int32Ty = Type::getInt32Ty(Context)

◆ LowAndHigh

Metadata* LowAndHigh[]

◆ NVVMIntrRangeSM

cl::opt<unsigned> NVVMIntrRangeSM("nvvm-intr-range-sm", cl::init(20), cl::Hidden, cl::desc("SM variant"))
static

◆ true

return true

Definition at line 72 of file NVVMIntrRange.cpp.

Int32Ty
IntegerType * Int32Ty
Definition: NVVMIntrRange.cpp:67
High
uint64_t High
Definition: NVVMIntrRange.cpp:61
C
(vector float) vec_cmpeq(*A, *B) C
Definition: README_ALTIVEC.txt:86
get
Should compile to something r4 addze r3 instead we get
Definition: README.txt:24