LLVM 20.0.0git
|
Computes function attributes in post-order over the call graph. More...
#include "llvm/Transforms/IPO/FunctionAttrs.h"
Public Member Functions | |
PostOrderFunctionAttrsPass (bool SkipNonRecursive=false) | |
PreservedAnalyses | run (LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Public Member Functions inherited from llvm::PassInfoMixin< PostOrderFunctionAttrsPass > | |
void | printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName) |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::PassInfoMixin< PostOrderFunctionAttrsPass > | |
static StringRef | name () |
Gets the name of the pass we are mixed into. | |
Computes function attributes in post-order over the call graph.
By operating in post-order, this pass computes precise attributes for called functions prior to processsing their callers. This "bottom-up" approach allows powerful interprocedural inference of function attributes like memory access patterns, etc. It can discover functions that do not access memory, or only read memory, and give them the readnone/readonly attribute. It also discovers function arguments that are not captured by the function and marks them with the nocapture attribute.
Definition at line 49 of file FunctionAttrs.h.
|
inline |
Definition at line 50 of file FunctionAttrs.h.
void PostOrderFunctionAttrsPass::printPipeline | ( | raw_ostream & | OS, |
function_ref< StringRef(StringRef)> | MapClassName2PassName | ||
) |
Definition at line 2330 of file FunctionAttrs.cpp.
References OS, and printPipeline().
Referenced by printPipeline().
PreservedAnalyses PostOrderFunctionAttrsPass::run | ( | LazyCallGraph::SCC & | C, |
CGSCCAnalysisManager & | AM, | ||
LazyCallGraph & | CG, | ||
CGSCCUpdateResult & | UR | ||
) |
Definition at line 2270 of file FunctionAttrs.cpp.
References llvm::PreservedAnalyses::all(), llvm::CallingConv::C, deriveAttrsInPostOrder(), F, FAM, llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::invalidate(), N, llvm::PreservedAnalyses::preserve(), llvm::PreservedAnalyses::preserveSet(), and llvm::SmallVectorTemplateBase< T, bool >::push_back().