struct PostOrderFunctionAttrsPass

Declaration

struct PostOrderFunctionAttrsPass : public PassInfoMixin { /* full declaration omitted */ };

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.

Declared at: llvm/include/llvm/Transforms/IPO/FunctionAttrs.h:50

Inherits from: PassInfoMixin

Method Overview

  • public llvm::PreservedAnalyses run(LazyCallGraph::SCC & C, llvm::CGSCCAnalysisManager & AM, llvm::LazyCallGraph & CG, llvm::CGSCCUpdateResult & UR)

Methods

ΒΆllvm::PreservedAnalyses run(
    LazyCallGraph::SCC& C,
    llvm::CGSCCAnalysisManager& AM,
    llvm::LazyCallGraph& CG,
    llvm::CGSCCUpdateResult& UR)

Declared at: llvm/include/llvm/Transforms/IPO/FunctionAttrs.h:51

Parameters

LazyCallGraph::SCC& C
llvm::CGSCCAnalysisManager& AM
llvm::LazyCallGraph& CG
llvm::CGSCCUpdateResult& UR