LLVM 19.0.0git
Classes | Public Member Functions | List of all members
llvm::InternalizePass Class Reference

A pass that internalizes all functions and variables other than those that must be preserved according to MustPreserveGV. More...

#include "llvm/Transforms/IPO/Internalize.h"

Inheritance diagram for llvm::InternalizePass:
Inheritance graph
[legend]

Public Member Functions

 InternalizePass ()
 
 InternalizePass (std::function< bool(const GlobalValue &)> MustPreserveGV)
 
bool internalizeModule (Module &TheModule)
 Run the internalizer on TheModule, returns true if any changes was made.
 
PreservedAnalyses run (Module &M, ModuleAnalysisManager &AM)
 
- Public Member Functions inherited from llvm::PassInfoMixin< InternalizePass >
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
 

Additional Inherited Members

- Static Public Member Functions inherited from llvm::PassInfoMixin< InternalizePass >
static StringRef name ()
 Gets the name of the pass we are mixed into.
 

Detailed Description

A pass that internalizes all functions and variables other than those that must be preserved according to MustPreserveGV.

Definition at line 34 of file Internalize.h.

Constructor & Destructor Documentation

◆ InternalizePass() [1/2]

InternalizePass::InternalizePass ( )

Definition at line 271 of file Internalize.cpp.

◆ InternalizePass() [2/2]

llvm::InternalizePass::InternalizePass ( std::function< bool(const GlobalValue &)>  MustPreserveGV)
inline

Definition at line 63 of file Internalize.h.

Member Function Documentation

◆ internalizeModule()

bool InternalizePass::internalizeModule ( Module TheModule)

Run the internalizer on TheModule, returns true if any changes was made.

Definition at line 185 of file Internalize.cpp.

References llvm::collectUsedGlobalVariables(), llvm::dbgs(), F, llvm::Value::getName(), I, llvm::StringSet< AllocatorTy >::insert(), llvm::Triple::isOSAIX(), llvm::Triple::isOSBinFormatWasm(), and LLVM_DEBUG.

Referenced by llvm::internalizeModule(), and run().

◆ run()

PreservedAnalyses InternalizePass::run ( Module M,
ModuleAnalysisManager AM 
)

The documentation for this class was generated from the following files: