LLVM
8.0.1
|
Computes function attributes in post-order over the call graph. More...
#include "llvm/Transforms/IPO/FunctionAttrs.h"
Public Member Functions | |
PreservedAnalyses | run (LazyCallGraph::SCC &C, CGSCCAnalysisManager &AM, LazyCallGraph &CG, CGSCCUpdateResult &UR) |
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. More... | |
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 51 of file FunctionAttrs.h.
PreservedAnalyses PostOrderFunctionAttrsPass::run | ( | LazyCallGraph::SCC & | C, |
CGSCCAnalysisManager & | AM, | ||
LazyCallGraph & | CG, | ||
CGSCCUpdateResult & | UR | ||
) |
Definition at line 1350 of file FunctionAttrs.cpp.
References llvm::AnalysisUsage::addRequired(), llvm::PreservedAnalyses::all(), C, deriveAttrsInPostOrder(), F(), llvm::getAAResultsAnalysisUsage(), llvm::CallGraphSCCPass::getAnalysisUsage(), llvm::PassRegistry::getPassRegistry(), llvm::AnalysisManager< IRUnitT, ExtraArgTs >::getResult(), llvm::Function::hasFnAttribute(), I, INITIALIZE_PASS_BEGIN(), INITIALIZE_PASS_DEPENDENCY, llvm::initializePostOrderFunctionAttrsLegacyPassPass(), llvm::instructions(), N, llvm::Attribute::Naked, llvm::PreservedAnalyses::none(), llvm::Attribute::OptimizeNone, and llvm::AnalysisUsage::setPreservesCFG().