|
LLVM
10.0.0
|
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"
Public Member Functions | |
| InternalizePass () | |
| InternalizePass (std::function< bool(const GlobalValue &)> MustPreserveGV) | |
| bool | internalizeModule (Module &TheModule, CallGraph *CG=nullptr) |
Run the internalizer on TheModule, returns true if any changes was made. More... | |
| PreservedAnalyses | run (Module &M, ModuleAnalysisManager &AM) |
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. More... | |
A pass that internalizes all functions and variables other than those that must be preserved according to MustPreserveGV.
Definition at line 36 of file Internalize.h.
| InternalizePass::InternalizePass | ( | ) |
Definition at line 237 of file Internalize.cpp.
Referenced by llvm::internalizeModule().
|
inline |
Definition at line 55 of file Internalize.h.
References internalizeModule(), and run().
Run the internalizer on TheModule, returns true if any changes was made.
If the CallGraph CG is supplied, it will be updated when internalizing a function (by removing any edge from the "external node")
Definition at line 150 of file Internalize.cpp.
References llvm::collectUsedGlobalVariables(), llvm::dbgs(), llvm::StringMapImpl::empty(), F(), llvm::Module::getComdatSymbolTable(), llvm::CallGraph::getExternalCallingNode(), llvm::Value::getName(), I, LLVM_DEBUG, and llvm::CallGraphNode::removeOneAbstractEdgeTo().
Referenced by InternalizePass(), and run().
| PreservedAnalyses InternalizePass::run | ( | Module & | M, |
| ModuleAnalysisManager & | AM | ||
| ) |
Definition at line 239 of file Internalize.cpp.
References llvm::AnalysisUsage::addPreserved(), llvm::PreservedAnalyses::all(), function, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getCachedResult(), llvm::CallGraphWrapperPass::getCallGraph(), llvm::PassRegistry::getPassRegistry(), llvm::initializeInternalizeLegacyPassPass(), internalizeModule(), llvm::PreservedAnalyses::preserve(), and llvm::AnalysisUsage::setPreservesCFG().
Referenced by InternalizePass().
1.8.13