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
 ---------------------— PointerInfo ------------------------------------—
 

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.

Referenced by llvm::adaptNoAliasScopes(), llvm::LLVMTargetMachine::addAsmPrinter(), addAsyncContextAttrs(), llvm::HexagonMCInstrInfo::addConstant(), llvm::HexagonMCInstrInfo::addConstExtender(), llvm::sampleprof::SampleProfileWriterBinary::addContext(), llvm::sampleprof::SampleProfileWriterExtBinaryBase::addContext(), llvm::ConstantPool::addEntry(), addFramePointerAttrs(), llvm::DwarfCompileUnit::addGlobalName(), llvm::DwarfTypeUnit::addGlobalName(), llvm::DwarfCompileUnit::addGlobalNameForTypeUnit(), llvm::DwarfCompileUnit::addGlobalType(), llvm::DwarfTypeUnit::addGlobalType(), llvm::DwarfCompileUnit::addGlobalTypeUnitType(), addModuleFlags(), AddReturnAttributes(), AddRuntimeUnrollDisableMetaData(), addSwiftSelfAttrs(), adjustDuplex(), llvm::ARMFrameLowering::adjustForSegmentedStacks(), llvm::RegAllocBase::allocatePhysRegs(), llvm::HexagonTargetLowering::allowsMemoryAccess(), llvm::TargetLoweringBase::allowsMemoryAccess(), llvm::TargetLoweringBase::allowsMemoryAccessForAlignment(), llvm::BasicTTIImplBase< AMDGPUTTIImpl >::allowsMisalignedMemoryAccesses(), llvm::TargetTransformInfo::allowsMisalignedMemoryAccesses(), llvm::LoopVersioning::annotateInstWithNoAlias(), llvm::DwarfCompileUnit::applySubprogramAttributesToDefinition(), assureFPCallStub(), llvm::AVRMCELFStreamer::AVRMCELFStreamer(), llvm::BinaryStreamError::BinaryStreamError(), llvm::BitcodeReaderValueList::BitcodeReaderValueList(), llvm::DICompositeType::buildODRType(), buildSymbolDiff(), llvm::CallGraphSCC::CallGraphSCC(), llvm::VETargetLowering::CanLowerReturn(), llvm::LanaiTargetLowering::CanLowerReturn(), llvm::HexagonTargetLowering::CanLowerReturn(), llvm::SITargetLowering::CanLowerReturn(), llvm::RISCVTargetLowering::CanLowerReturn(), llvm::SystemZTargetLowering::CanLowerReturn(), llvm::sampleprof::SampleContextTrimmer::canonicalizeContextProfiles(), canonicalizeMetadataForValue(), llvm::HexagonMCInstrInfo::canonicalizePacket(), checkGlobalVariableScope(), llvm::cloneAndAdaptNoAliasScopes(), llvm::UnreachableInst::cloneImpl(), llvm::JumpThreadingPass::cloneInstructions(), llvm::cloneNoAliasScopes(), llvm::DefaultContextualFoldingSetTrait< T, Ctx >::ComputeHash(), llvm::ContextualFoldingSet< T, Ctx >::ContextualFoldingSet(), convertToGuardPredicates(), llvm::object::IRObjectFile::create(), llvm::BasicBlock::Create(), llvm::StructType::create(), llvm::createAArch64ELFStreamer(), llvm::createAArch64WinCOFFStreamer(), llvm::createAMDGPUELFStreamer(), llvm::createARMELFStreamer(), llvm::createARMWinCOFFStreamer(), llvm::createAsmStreamer(), llvm::createAVRELFStreamer(), llvm::object::createBinary(), llvm::DIBuilder::createClassType(), llvm::MIRParserImpl::createDummyFunction(), llvm::createELFStreamer(), createEmptyFunction(), createFPFnStub(), llvm::LTOModule::createFromBuffer(), llvm::LTOModule::createFromFile(), llvm::LTOModule::createFromOpenFile(), llvm::LTOModule::createFromOpenFileSlice(), llvm::sampleprofutil::createFSDiscriminatorVariable(), llvm::DIBuilder::createGlobalVariableExpression(), llvm::createHexagonELFStreamer(), llvm::DIBuilder::createImportedDeclaration(), createImportedModule(), llvm::DIBuilder::createImportedModule(), llvm::LTOModule::createInLocalContext(), llvm::DIBuilder::createLabel(), createLocalVariable(), llvm::createMachOStreamer(), createMCStreamer(), llvm::LLVMTargetMachine::createMCStreamer(), llvm::DIBuilder::createMethod(), llvm::createMipsELFStreamer(), llvm::createMipsNaClELFStreamer(), llvm::createMIRParser(), llvm::createMIRParserFromFile(), llvm::createNullStreamer(), llvm::createPPCELFStreamer(), createPPCELFStreamer(), llvm::createPPCXCOFFStreamer(), createPPCXCOFFStreamer(), createStringMetadata(), llvm::DIBuilder::createStructType(), llvm::DIBuilder::createTempFunctionFwdDecl(), llvm::DIBuilder::createTempGlobalVariableFwdDecl(), llvm::DIBuilder::createTemplateParameterPack(), llvm::DIBuilder::createTemplateTemplateParameter(), llvm::DIBuilder::createTemplateTypeParameter(), llvm::DIBuilder::createTemplateValueParameter(), createTemplateValueParameterHelper(), llvm::DIBuilder::createTypedef(), llvm::DwarfUnit::createTypeDIE(), llvm::createWasmStreamer(), llvm::createXCOFFStreamer(), DecodeFixedType(), llvm::X86TargetLowering::decomposeMulByConstant(), llvm::HexagonMCInstrInfo::deriveDuplex(), DiagHandler(), DisableAllLoopOptsOnLoop(), llvm::DITemplateParameter::DITemplateParameter(), llvm::MDNode::dropAllReferences(), llvm::DWARFCompileUnit::DWARFCompileUnit(), llvm::DWARFTypeUnit::DWARFTypeUnit(), llvm::MCDwarfLineAddr::Emit(), llvm::MCDwarfFrameEmitter::Emit(), EmitAbsDifference(), llvm::MCDwarfFrameEmitter::EmitAdvanceLoc(), llvm::AMDGPUTargetELFStreamer::EmitAmdhsaKernelDescriptor(), llvm::emitBCmp(), llvm::MipsTargetELFStreamer::emitDirectiveEnd(), llvm::MipsTargetELFStreamer::emitFrame(), llvm::AMDGPUAsmPrinter::emitFunctionBodyEnd(), llvm::emitFWrite(), llvm::AMDGPUTargetELFStreamer::EmitHSAMetadata(), llvm::MipsELFStreamer::emitInstruction(), llvm::AMDGPUTargetELFStreamer::EmitISAVersion(), llvm::emitMalloc(), llvm::emitMemChr(), llvm::emitMemCmp(), llvm::emitMemCpyChk(), llvm::emitMemPCpy(), llvm::MipsTargetELFStreamer::emitMipsAbiFlags(), llvm::AArch64TargetStreamer::emitNoteSection(), llvm::ARMFrameLowering::emitPrologue(), llvm::ARCFrameLowering::emitPrologue(), llvm::emitStrLen(), llvm::emitStrNCmp(), EmitSymbolRefWithOfs(), llvm::MCDwarfLineAddr::Encode(), llvm::MCDwarfFrameEmitter::EncodeAdvanceLoc(), llvm::DefaultContextualFoldingSetTrait< T, Ctx >::Equals(), llvm::MIRParserImpl::error(), ErrorFromHResult(), llvm::AVRMCExpr::evaluateAsRelocatableImpl(), llvm::PPCMCExpr::evaluateAsRelocatableImpl(), llvm::HexagonMCInstrInfo::extendIfNeeded(), llvm::DWARFUnit::extractRangeList(), llvm::MachineModuleInfo::finalize(), llvm::DWARFUnit::findRnglistFromOffset(), llvm::AMDGPULibCalls::fold(), forceExpAbs(), llvm::gcovOneInput(), llvm::Attribute::get(), llvm::ConstantInt::get(), llvm::MetadataAsValue::get(), llvm::StructType::get(), llvm::ConstantFP::get(), llvm::ValueAsMetadata::get(), llvm::MDString::get(), llvm::ConstantDataArray::get(), llvm::ConstantDataVector::get(), llvm::ConstantTokenNone::get(), llvm::MDNode::get(), llvm::MDTuple::get(), GetAbsDifference(), llvm::DWARFUnit::getAddrOffsetSectionItem(), getAISize(), llvm::object::Archive::Child::getAsBinary(), llvm::ConstantInt::getBool(), llvm::DINode::getCanonicalMDString(), llvm::DIMacroNode::getCanonicalMDString(), llvm::DeclContextTree::getChildDeclContext(), getCompoundInsn(), llvm::Type::getContext(), llvm::LLParser::getContext(), llvm::MachineModuleInfo::getContext(), llvm::LTOCodeGenerator::getContext(), llvm::CCState::getContext(), llvm::Module::getContext(), llvm::DWARFUnit::getContext(), llvm::MCStreamer::getContext(), llvm::MCAssembler::getContext(), llvm::ReplaceableMetadataImpl::getContext(), llvm::SelectionDAG::getContext(), llvm::ContextualFoldingSet< T, Ctx >::getContext(), llvm::Pattern::getContext(), llvm::MDNode::getContext(), llvm::SampleContextTracker::getContextFor(), llvm::sampleprof::SampleContext::getContextString(), llvm::DWARFUnit::getDebugInfoExtractor(), llvm::MDNode::getDistinct(), llvm::MDTuple::getDistinct(), llvm::EVT::getDoubleNumVectorElementsVT(), llvm::getDWARFUnitIndex(), llvm::MCAsmInfo::getExprForFDESymbol(), llvm::AArch64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::X86_64MCAsmInfoDarwin::getExprForPersonalitySymbol(), llvm::ConstantInt::getFalse(), getFunctionTypeFromAsyncSuspend(), getGlobalOffsetTable(), llvm::EVT::getHalfNumVectorElementsVT(), llvm::EVT::getHalfSizedIntegerVT(), llvm::MetadataAsValue::getIfExists(), llvm::MDNode::getIfExists(), llvm::MDTuple::getIfExists(), llvm::EVT::getIntegerVT(), getKeyFPValMD(), getKeyValMD(), llvm::getLazyBitcodeModule(), llvm::BitcodeModule::getLazyModule(), llvm::ProfileSummary::getMD(), getMDNodeOperandImpl(), llvm::GCNTTIImpl::getMemcpyLoopLoweringType(), llvm::TargetTransformInfoImplBase::getMemcpyLoopLoweringType(), llvm::TargetTransformInfo::getMemcpyLoopLoweringType(), llvm::GCNTTIImpl::getMemcpyLoopResidualLoweringType(), llvm::TargetTransformInfoImplBase::getMemcpyLoopResidualLoweringType(), llvm::TargetTransformInfo::getMemcpyLoopResidualLoweringType(), llvm::SystemZTargetLowering::getNumRegisters(), llvm::TargetLoweringBase::getNumRegisters(), llvm::SITargetLowering::getNumRegistersForCallingConv(), llvm::MipsTargetLowering::getNumRegistersForCallingConv(), llvm::RISCVTargetLowering::getNumRegistersForCallingConv(), llvm::X86TargetLowering::getNumRegistersForCallingConv(), llvm::TargetLoweringBase::getNumRegistersForCallingConv(), llvm::DICompositeType::getODRTypeIfExists(), llvm::DwarfUnit::getOrCreateContextDIE(), llvm::DwarfUnit::getOrCreateTypeDIE(), getOrSelfReference(), llvm::getOwningLazyBitcodeModule(), llvm::DwarfUnit::getParentContextString(), llvm::EVT::getPow2VectorType(), llvm::LTOModule::getProducerString(), GetRegistersForValue(), llvm::TargetLoweringBase::getRegisterType(), llvm::SITargetLowering::getRegisterTypeForCallingConv(), llvm::MipsTargetLowering::getRegisterTypeForCallingConv(), llvm::RISCVTargetLowering::getRegisterTypeForCallingConv(), llvm::X86TargetLowering::getRegisterTypeForCallingConv(), llvm::TargetLoweringBase::getRegisterTypeForCallingConv(), llvm::CallLowering::getReturnInfo(), llvm::DWARFUnit::getRnglistOffset(), llvm::EVT::getRoundIntegerType(), llvm::RISCVTargetLowering::getSetCCResultType(), llvm::X86TargetLowering::getSetCCResultType(), llvm::InstrProfIncrementInst::getStep(), llvm::ConstantDataArray::getString(), llvm::DWARFUnit::getStringOffsetSectionItem(), getSymbols(), llvm::MDNode::getTemporary(), llvm::MDTuple::getTemporary(), getTLSGetOffset(), llvm::ConstantInt::getTrue(), llvm::Intrinsic::getType(), llvm::TargetLoweringBase::getTypeAction(), llvm::ConstantStruct::getTypeForElements(), llvm::EVT::getTypeForEVT(), llvm::AMDGPUTargetLowering::getTypeForExtReturn(), llvm::MipsTargetLowering::getTypeForExtReturn(), llvm::TargetLowering::getTypeForExtReturn(), llvm::TargetLoweringBase::getTypeToExpandTo(), llvm::TargetLoweringBase::getTypeToTransformTo(), llvm::TargetLoweringBase::getVectorTypeBreakdown(), llvm::SITargetLowering::getVectorTypeBreakdownForCallingConv(), llvm::MipsTargetLowering::getVectorTypeBreakdownForCallingConv(), llvm::TargetLoweringBase::getVectorTypeBreakdownForCallingConv(), llvm::X86TargetLowering::getVectorTypeBreakdownForCallingConv(), llvm::EVT::getVectorVT(), getWinCFISection(), llvm::Attribute::getWithAlignment(), llvm::Attribute::getWithAllocSizeArgs(), llvm::Attribute::getWithByRefType(), llvm::Attribute::getWithByValType(), llvm::Attribute::getWithDereferenceableBytes(), llvm::Attribute::getWithDereferenceableOrNullBytes(), llvm::Attribute::getWithInAllocaType(), llvm::Attribute::getWithNewType(), llvm::Attribute::getWithPreallocatedType(), llvm::Attribute::getWithStackAlignment(), llvm::Attribute::getWithStructRetType(), llvm::Attribute::getWithVScaleRangeArgs(), llvm::ValueAsMetadata::handleRAUW(), handleYAMLDiag(), llvm::HexagonMCShuffle(), llvm::DwarfStreamer::init(), inlineGetBaseAndOffset(), llvm::LTOModule::isBitcodeForTarget(), llvm::object::SymbolicFile::isSymbolicFile(), llvm::RISCVTargetLowering::joinRegisterPartsIntoValue(), llvm::DWARFLinker::link(), LLVMAddInternalizePassWithMustPreservePredicate(), LLVMCreateBinary(), LLVMGetCurrentDebugLocation(), LLVMGetMDNodeOperands(), LLVMGetNamedMetadataOperands(), LLVMMDNodeInContext(), LLVMMDStringInContext(), lookForCompound(), LowerCTLZ(), LowerFPToInt(), llvm::IntrinsicLowering::LowerIntrinsicCall(), llvm::RISCVTargetLowering::LowerOperation(), LowerUINT_TO_FP_i64(), llvm::LTOCodeGenerator::LTOCodeGenerator(), llvm::object::makeDuplicateResourceError(), llvm::makePostTransformationMetadata(), makeStatepointExplicitImpl(), llvm::coro::LowererBase::makeSubFnCall(), llvm::MCWasmStreamer::MCWasmStreamer(), llvm::MDBuilder::MDBuilder(), llvm::MetadataLoader::MetadataLoaderImpl::MetadataLoaderImpl(), llvm::MipsELFStreamer::MipsELFStreamer(), llvm::MipsRegInfoRecord::MipsRegInfoRecord(), llvm::sampleprof::SampleContext::Hash::operator()(), llvm::HexagonMCInstrInfo::padEndloop(), llvm::object::WindowsResourceParser::parse(), llvm::parseAndVerify(), llvm::parseBitcodeFile(), parseBitcodeFileImpl(), llvm::MIRParserImpl::parseIRModule(), llvm::parseModule(), llvm::BitcodeModule::parseModule(), llvm::Pattern::parseNumericSubstitutionBlock(), llvm::Pattern::Pattern(), prepareForSplit(), llvm::LoopVersioning::prepareNoAliasMetadata(), llvm::MIPrinter::print(), llvm::MachineMemOperand::print(), llvm::MachineInstr::print(), printSyncScope(), llvm::DefaultContextualFoldingSetTrait< T, Ctx >::Profile(), llvm::RegsForValue::RegsForValue(), llvm::MDNode::replaceAllUsesWith(), replaceAsyncResumeFunction(), llvm::HexagonMCInstrInfo::replaceDuplex(), llvm::RISCVTargetLowering::ReplaceNodeResults(), llvm::ReplayInlineAdvisor::ReplayInlineAdvisor(), llvm::MIRParserImpl::reportDiagnostic(), llvm::SimpleLoopUnswitchPass::run(), llvm::ThinLTOCodeGenerator::run(), llvm::OptimizationRemarkEmitterAnalysis::run(), llvm::runIPSCCP(), llvm::OptimizationRemarkEmitterWrapperPass::runOnFunction(), llvm::R600AsmPrinter::runOnMachineFunction(), llvm::AMDGPUAsmPrinter::runOnMachineFunction(), llvm::sampleprof::SampleContext::SampleContext(), llvm::SampleContextTracker::SampleContextTracker(), ScaleAddrDelta(), llvm::LoopVectorizeHints::setAlreadyVectorized(), llvm::sampleprof::SampleContext::setContext(), llvm::Loop::setLoopAlreadyUnrolled(), llvm::Loop::setLoopMustProgress(), llvm::setupLLVMOptimizationRemarks(), llvm::lto::setupLLVMOptimizationRemarks(), llvm::TargetLoweringBase::shouldNormalizeToSelectSequence(), splitAsyncCoroutine(), llvm::splitLoopBound(), llvm::RISCVTargetLowering::splitValueIntoRegisterParts(), llvm::MDNode::storeDistinctInContext(), transformCallee(), llvm::HexagonMCInstrInfo::tryCompound(), llvm::DWARFUnit::tryExtractDIEsIfNeeded(), llvm::UpgradeBitCastExpr(), llvm::UpgradeBitCastInst(), llvm::UpgradeTBAANode(), llvm::EVT::widenIntegerVectorElementType(), WriteAsOperandInternal(), WriteConstantInternal(), llvm::sampleprof::SampleProfileWriterBinary::writeContextIdx(), llvm::sampleprof::SampleProfileWriterExtBinaryBase::writeContextIdx(), llvm::sampleprof::SampleProfileWriterExtBinaryBase::writeCSNameIdx(), llvm::sampleprof::SampleProfileWriterExtBinaryBase::writeCSNameTableSection(), llvm::sampleprof::SampleProfileWriterExtBinaryBase::writeFuncOffsetTable(), and llvm::sampleprof::SampleProfileWriterExtBinaryBase::writeSample().

◆ 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