25#define DEBUG_TYPE "spirv-finalize-shader-linkage"
42 if (
F.hasExternalLinkage() && !
F.hasHiddenVisibility())
44 if (!
F.hasLocalLinkage()) {
51 bool LocalChange =
true;
55 if (
F.isDefTriviallyDead()) {
63class SPIRVFinalizeShaderLinkageLegacy :
public ModulePass {
69 return "SPIRV Finalize Shader Linkage";
71 bool runOnModule(
Module &M)
override {
return finalizeShaderLinkage(TM, M); }
85char SPIRVFinalizeShaderLinkageLegacy::ID = 0;
88 "spirv-finalize-shader-linkage",
89 "Finalize SPIR-V shader linkage",
false,
false)
93 return new SPIRVFinalizeShaderLinkageLegacy(TM);
Module.h This file contains the declarations for the Module class.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
@ InternalLinkage
Rename collisions when linking (static functions).
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.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
const SPIRVSubtarget * getSubtargetImpl() const
Represent a constant reference to a string, i.e.
unsigned ID
LLVM IR allows to use arbitrary numbers as calling convention identifiers.
This is an optimization pass for GlobalISel generic memory operations.
iterator_range< early_inc_iterator_impl< detail::IterOfRange< RangeT > > > make_early_inc_range(RangeT &&Range)
Make a range that does early increment to allow mutation of the underlying range without disrupting i...
ModulePass * createSPIRVFinalizeShaderLinkagePass(const SPIRVTargetMachine &TM)
bool isEntryPoint(const Function &F)
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.