16#define DEBUG_TYPE "dxil-finalize-linkage" 
   21  bool MadeChange = 
false;
 
   26    GV.removeDeadConstantUsers();
 
   27    if (GV.hasPrivateLinkage() || (GV.hasExternalLinkage() && GV.use_empty())) {
 
   39    if (EF.hasExternalLinkage() && EF.hasDefaultVisibility())
 
   41    if (EF.hasFnAttribute(
"hlsl.shader"))
 
   51    if (
F->isDefTriviallyDead()) {
 
   52      M.getFunctionList().erase(
F);
 
 
   74                      "DXIL Finalize Linkage", 
false, 
false)
 
static bool finalizeLinkage(Module &M)
Module.h This file contains the declarations for the Module class.
#define INITIALIZE_PASS_END(passName, arg, name, cfg, analysis)
#define INITIALIZE_PASS_BEGIN(passName, arg, name, cfg, analysis)
bool runOnModule(Module &M) override
runOnModule - Virtual method overriden by subclasses to process the module being operated on.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &)
@ InternalLinkage
Rename collisions when linking (static functions).
@ ExternalLinkage
Externally visible function.
ModulePass class - This class is used to implement unstructured interprocedural optimizations and ana...
A Module instance is used to store all the information related to an LLVM module.
A set of analyses that are preserved following a run of a transformation pass.
static PreservedAnalyses none()
Convenience factory function for the empty preserved set.
static PreservedAnalyses all()
Construct a special preserved set that preserves all passes.
void push_back(const T &Elt)
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
This is an optimization pass for GlobalISel generic memory operations.
ModulePass * createDXILFinalizeLinkageLegacyPass()
Pass to finalize linkage of functions.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.