LLVM 22.0.0git
|
Additional 'norecurse' attribute deduction during postlink LTO phase. More...
#include "llvm/Transforms/IPO/FunctionAttrs.h"
Public Member Functions | |
LLVM_ABI PreservedAnalyses | run (Module &M, ModuleAnalysisManager &MAM) |
Public Member Functions inherited from llvm::PassInfoMixin< NoRecurseLTOInferencePass > | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::PassInfoMixin< NoRecurseLTOInferencePass > | |
static StringRef | name () |
Gets the name of the pass we are mixed into. |
Additional 'norecurse' attribute deduction during postlink LTO phase.
This is a module pass that infers 'norecurse' attribute on functions. It runs during LTO and analyzes the module's call graph to find functions that are guaranteed not to call themselves, either directly or indirectly. The pass uses a module-wide flag which checks if any function's address is taken or any function in the module has external linkage, to safely handle indirect and library function calls from current function.
Definition at line 90 of file FunctionAttrs.h.
PreservedAnalyses NoRecurseLTOInferencePass::run | ( | Module & | M, |
ModuleAnalysisManager & | MAM ) |
Definition at line 2449 of file FunctionAttrs.cpp.
References llvm::PreservedAnalyses::all(), llvm::LazyCallGraph::SCC::begin(), llvm::LazyCallGraph::buildRefSCCs(), Changed, F, MAM, mayHaveRecursiveCallee(), llvm::LazyCallGraph::postorder_ref_sccs(), llvm::PreservedAnalyses::preserve(), and llvm::LazyCallGraph::SCC::size().