llvm::DeadArgumentEliminationPass

Eliminate dead arguments (and return values) from functions.

Synopsis

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

class DeadArgumentEliminationPass
    : public OptionalPassInfoMixin<DeadArgumentEliminationPass>

Base Classes

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

Types

NameDescription
RetOrArg Struct that represents (part of) either a return value or a function argument. Used so that arguments and return values can be used interchangeably.

Type Aliases

NameDescription
FuncSet Set of functions that must not be modified by this pass.
LiveSet Set of returns and arguments known to be live.
UseMap Multimap from a return or argument to MaybeLive values it uses.
UseVector Small vector of returns and arguments collected while surveying uses.

Enums

NameDescription
Liveness Liveness of a return value or argument during dead-argument analysis.

Member Functions

NameDescription
createArg Convenience wrapper
createRet Convenience wrapper
run Run dead-argument elimination over the given module.

Static Member Functions

NameDescription
isRequired Return false; optional passes may be skipped.

Data Members

NameDescription
FrozenFunctions This set contains all functions that cannot be changed in any way.
FrozenRetTyFunctions This set contains all functions that cannot change return type;
LiveValues This set contains all values that have been determined to be live.
Uses Multimap from each return or argument to the MaybeLive values it uses.