LLVM  14.0.0git
Namespaces | Macros | Functions | Variables
NVVMReflect.cpp File Reference
#include "NVPTX.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/DerivedTypes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/InstIterator.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/IntrinsicsNVPTX.h"
#include "llvm/IR/Module.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Type.h"
#include "llvm/Pass.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_os_ostream.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Scalar.h"
#include <sstream>
#include <string>
Include dependency graph for NVVMReflect.cpp:

Go to the source code of this file.

Namespaces

 llvm
 ---------------------— PointerInfo ------------------------------------—
 

Macros

#define NVVM_REFLECT_FUNCTION   "__nvvm_reflect"
 
#define DEBUG_TYPE   "nvptx-reflect"
 

Functions

void llvm::initializeNVVMReflectPass (PassRegistry &)
 
 INITIALIZE_PASS (NVVMReflect, "nvvm-reflect", "Replace occurrences of __nvvm_reflect() calls with 0/1", false, false) static bool runNVVMReflect(Function &F
 
 if (F.getName()==NVVM_REFLECT_FUNCTION)
 
 for (Instruction &I :instructions(F))
 
 for (Instruction *I :ToRemove) I -> eraseFromParent()
 
return ToRemove size () > 0
 

Variables

static cl::opt< bool > NVVMReflectEnabled ("nvvm-reflect-enable", cl::init(true), cl::Hidden, cl::desc("NVVM reflection, enabled by default"))
 
unsigned SmVersion
 
SmallVector< Instruction *, 4 > ToRemove
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "nvptx-reflect"

Definition at line 46 of file NVVMReflect.cpp.

◆ NVVM_REFLECT_FUNCTION

#define NVVM_REFLECT_FUNCTION   "__nvvm_reflect"

Definition at line 42 of file NVVMReflect.cpp.

Function Documentation

◆ for() [1/2]

for ( Instruction &I   :instructionsF)

◆ for() [2/2]

for ( Instruction *I :ToRemove  ) -> eraseFromParent()

◆ if()

if ( F.  getName() = NVVM_REFLECT_FUNCTION)

Definition at line 81 of file NVVMReflect.cpp.

References assert(), and F.

◆ INITIALIZE_PASS()

INITIALIZE_PASS ( NVVMReflect  ,
"nvvm-reflect"  ,
"Replace occurrences of __nvvm_reflect() calls with 0/1"  ,
false  ,
false   
) &

◆ size()

return ToRemove size ( )

Definition at line 166 of file README.txt.

Referenced by enlarge(), operator new(), llvm::orc::shared::detail::serializeViaSPSToWrapperFunctionResult(), llvm::orc::shared::SPSSerializationTraits< SPSRemoteSymbolLookupSetElement, SymbolLookupSet::value_type >::size(), llvm::orc::shared::SPSSerializationTraits< SPSRemoteSymbolLookup, ExecutorProcessControl::LookupRequest >::size(), llvm::orc::shared::SPSArgList< SPSTagT, SPSTagTs... >::size(), llvm::orc::shared::SPSSerializationTraits< SPSExecutorAddr, ExecutorAddr >::size(), llvm::orc::shared::SPSSerializationTraits< SPSRemoteSymbolLookupSetElement, RemoteSymbolLookupSetElement >::size(), llvm::orc::shared::SPSSerializationTraits< SPSMemoryProtectionFlags, tpctypes::WireProtectionFlags >::size(), llvm::orc::shared::SPSSerializationTraits< SPSRemoteSymbolLookup, RemoteSymbolLookup >::size(), llvm::orc::shared::SPSSerializationTraits< SPSExecutorAddrRange, ExecutorAddrRange >::size(), llvm::orc::shared::SPSSerializationTraits< SPSSupportFunctionCall, tpctypes::SupportFunctionCall >::size(), llvm::orc::shared::SPSSerializationTraits< SPSSimpleRemoteEPCExecutorInfo, SimpleRemoteEPCExecutorInfo >::size(), llvm::orc::shared::SPSSerializationTraits< SPSAllocationActionsPair, tpctypes::AllocationActionsPair >::size(), llvm::orc::shared::SPSSerializationTraits< SPSSegFinalizeRequest, tpctypes::SegFinalizeRequest >::size(), llvm::orc::shared::SPSSerializationTraits< SPSELFPerObjectSectionsToRegister, ELFPerObjectSectionsToRegister >::size(), llvm::orc::shared::SPSSerializationTraits< SPSMachOPerObjectSectionsToRegister, MachOPerObjectSectionsToRegister >::size(), llvm::orc::shared::SPSSerializationTraits< SPSFinalizeRequest, tpctypes::FinalizeRequest >::size(), llvm::orc::shared::SPSSerializationTraits< SPSMemoryAccessUIntWrite< T >, tpctypes::UIntWrite< T > >::size(), llvm::orc::shared::SPSSerializationTraits< SPSELFNixJITDylibInitializers, ELFNixJITDylibInitializers >::size(), llvm::orc::shared::SPSSerializationTraits< SPSMachOJITDylibInitializers, MachOJITDylibInitializers >::size(), llvm::orc::shared::SPSSerializationTraits< SPSMemoryAccessBufferWrite, tpctypes::BufferWrite >::size(), llvm::orc::shared::SPSSerializationTraits< SPSSequence< char >, ArrayRef< char > >::size(), llvm::orc::shared::SPSSerializationTraits< SPSSequence< SPSElementTagT >, SequenceT, std::enable_if_t< TrivialSPSSequenceSerialization< SPSElementTagT, SequenceT >::available > >::size(), llvm::orc::shared::SPSSerializationTraits< SPSTuple< SPSTagT1, SPSTagT2 >, std::pair< T1, T2 > >::size(), llvm::orc::shared::SPSSerializationTraits< SPSString, StringRef >::size(), llvm::orc::shared::SPSSerializationTraits< SPSSequence< SPSTuple< SPSString, SPSValueT > >, StringMap< ValueT > >::size(), llvm::orc::shared::SPSSerializationTraits< SPSError, detail::SPSSerializableError >::size(), llvm::orc::shared::SPSSerializationTraits< SPSExpected< SPSTagT >, detail::SPSSerializableExpected< T > >::size(), llvm::orc::shared::SPSSerializationTraits< SPSExpected< SPSTagT >, detail::SPSSerializableError >::size(), and llvm::orc::shared::SPSSerializationTraits< SPSExpected< SPSTagT >, T >::size().

Variable Documentation

◆ NVVMReflectEnabled

cl::opt<bool> NVVMReflectEnabled("nvvm-reflect-enable", cl::init(true), cl::Hidden, cl::desc("NVVM reflection, enabled by default"))
static

◆ SmVersion

unsigned SmVersion

◆ ToRemove

SmallVector<Instruction *, 4> ToRemove

Definition at line 88 of file NVVMReflect.cpp.

Referenced by for().

NVVMReflectEnabled
static cl::opt< bool > NVVMReflectEnabled("nvvm-reflect-enable", cl::init(true), cl::Hidden, cl::desc("NVVM reflection, enabled by default"))