LLVM 20.0.0git
Public Member Functions | List of all members
llvm::PostOrderFunctionAttrsPass Struct Reference

Computes function attributes in post-order over the call graph. More...

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

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

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.
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ PostOrderFunctionAttrsPass()

llvm::PostOrderFunctionAttrsPass::PostOrderFunctionAttrsPass ( bool  SkipNonRecursive = false)
inline

Definition at line 50 of file FunctionAttrs.h.

Member Function Documentation

◆ printPipeline()

void PostOrderFunctionAttrsPass::printPipeline ( raw_ostream OS,
function_ref< StringRef(StringRef)>  MapClassName2PassName 
)

Definition at line 1940 of file FunctionAttrs.cpp.

References OS, and printPipeline().

Referenced by printPipeline().

◆ run()

PreservedAnalyses PostOrderFunctionAttrsPass::run ( LazyCallGraph::SCC C,
CGSCCAnalysisManager AM,
LazyCallGraph CG,
CGSCCUpdateResult UR 
)

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