LLVM: llvm::DeadArgumentEliminationPass Class Reference (original) (raw)

Eliminate dead arguments (and return values) from functions. More...

#include "[llvm/Transforms/IPO/DeadArgumentElimination.h](DeadArgumentElimination%5F8h%5Fsource.html)"

Classes
struct RetOrArg
Struct that represents (part of) either a return value or a function argument. More...
Public Types
enum Liveness { Live, MaybeLive }
During our initial pass over the program, we determine that things are either alive or maybe alive. More...
using UseMap = std::multimap<RetOrArg, RetOrArg>
using LiveSet = std::set<RetOrArg>
using FuncSet = std::set<const Function *>
using UseVector = SmallVector<RetOrArg, 5>
Public Member Functions
DeadArgumentEliminationPass (bool ShouldHackArguments=false)
PreservedAnalyses run (Module &M, ModuleAnalysisManager &)
RetOrArg createRet (const Function *F, unsigned Idx)
Convenience wrapper.
RetOrArg createArg (const Function *F, unsigned Idx)
Convenience wrapper.
Public Member Functions inherited from llvm::PassInfoMixin< DeadArgumentEliminationPass >
void printPipeline (raw_ostream &OS, function_ref< StringRef(StringRef)> MapClassName2PassName)
Public Attributes
UseMap Uses
This maps a return value or argument to any MaybeLive return values or arguments it uses.
LiveSet LiveValues
This set contains all values that have been determined to be live.
FuncSet FrozenFunctions
This set contains all functions that cannot be changed in any way.
FuncSet FrozenRetTyFunctions
This set contains all functions that cannot change return type;.
bool ShouldHackArguments = false
This allows this pass to do double-duty as the dead arg hacking pass (used only by bugpoint).

Eliminate dead arguments (and return values) from functions.

Definition at line 38 of file DeadArgumentElimination.h.

FuncSet

LiveSet

UseMap

UseVector

Liveness

During our initial pass over the program, we determine that things are either alive or maybe alive.

We don't mark anything explicitly dead (even if we know they are), since anything not alive with no registered uses (in Uses) will never be marked alive and will thus become dead in the end.

Enumerator
Live
MaybeLive

Definition at line 73 of file DeadArgumentElimination.h.

llvm::DeadArgumentEliminationPass::DeadArgumentEliminationPass ( bool ShouldHackArguments = false) inline

createArg()

createRet()

run()

FrozenFunctions

FuncSet llvm::DeadArgumentEliminationPass::FrozenFunctions

FrozenRetTyFunctions

FuncSet llvm::DeadArgumentEliminationPass::FrozenRetTyFunctions

LiveValues

LiveSet llvm::DeadArgumentEliminationPass::LiveValues

ShouldHackArguments

bool llvm::DeadArgumentEliminationPass::ShouldHackArguments = false

Uses

UseMap llvm::DeadArgumentEliminationPass::Uses

This maps a return value or argument to any MaybeLive return values or arguments it uses.

This allows the MaybeLive values to be marked live when any of its users is marked live. For example (indices are left out for clarity):

Definition at line 106 of file DeadArgumentElimination.h.


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