llvm::NoRecurseLTOInferencePass

Additional 'norecurse' attribute deduction during postlink LTO phase.

Synopsis

Declared in <llvm/Transforms/IPO/FunctionAttrs.h>

class NoRecurseLTOInferencePass
    : public OptionalPassInfoMixin<NoRecurseLTOInferencePass>

Description

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.

Base Classes

NameDescription
OptionalPassInfoMixin<NoRecurseLTOInferencePass>A CRTP mix-in for passes that can be skipped.

Member Functions

Name
run

Static Member Functions

Name
isRequired