30class NVPTXAssignValidGlobalNames :
public ModulePass {
39char NVPTXAssignValidGlobalNames::ID = 0;
46 "Assign valid PTX names to globals",
false,
false)
48bool NVPTXAssignValidGlobalNames::runOnModule(
Module &M) {
51 if (GV.hasLocalLinkage()) {
56 GV.setName(NVPTX::getValidPTXIdentifier(GV.getName()));
62 if (
F.hasLocalLinkage())
63 F.setName(NVPTX::getValidPTXIdentifier(
F.getName()));
69 return new NVPTXAssignValidGlobalNames();
Module.h This file contains the declarations for the Module class.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
virtual bool runOnModule(Module &M)=0
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
A Module instance is used to store all the information related to an LLVM module.
PassRegistry - This class manages the registration and intitialization of the pass subsystem as appli...
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
ModulePass * createNVPTXAssignValidGlobalNamesPass()
void initializeNVPTXAssignValidGlobalNamesPass(PassRegistry &)