|
LLVM
4.0.0
|
Eliminate dead arguments (and return values) from functions. More...
#include <DeadArgumentElimination.h>
Classes | |
| struct | RetOrArg |
| Struct that represents (part of) either a return value or a function argument. More... | |
Public Types | |
| enum | Liveness { Live, MaybeLive } |
| Liveness enum - During our initial pass over the program, we determine that things are either alive or maybe alive. More... | |
| typedef std::multimap < RetOrArg, RetOrArg > | UseMap |
| typedef std::set< RetOrArg > | LiveSet |
| typedef std::set< const Function * > | LiveFuncSet |
| typedef SmallVector< RetOrArg, 5 > | UseVector |
Public Member Functions | |
| RetOrArg | CreateRet (const Function *F, unsigned Idx) |
| Convenience wrapper. More... | |
| RetOrArg | CreateArg (const Function *F, unsigned Idx) |
| Convenience wrapper. More... | |
| DeadArgumentEliminationPass (bool ShouldHackArguments_=false) | |
| PreservedAnalyses | run (Module &M, ModuleAnalysisManager &) |
Public Attributes | |
| UseMap | Uses |
| This maps a return value or argument to any MaybeLive return values or arguments it uses. More... | |
| LiveSet | LiveValues |
| This set contains all values that have been determined to be live. More... | |
| LiveFuncSet | LiveFunctions |
| This set contains all values that are cannot be changed in any way. More... | |
| bool | ShouldHackArguments = false |
| This allows this pass to do double-duty as the dead arg hacking pass (used only by bugpoint). More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from llvm::PassInfoMixin< DeadArgumentEliminationPass > | |
| static StringRef | name () |
| Gets the name of the pass we are mixed into. More... | |
Eliminate dead arguments (and return values) from functions.
Definition at line 33 of file DeadArgumentElimination.h.
| typedef std::set<const Function *> llvm::DeadArgumentEliminationPass::LiveFuncSet |
Definition at line 97 of file DeadArgumentElimination.h.
| typedef std::set<RetOrArg> llvm::DeadArgumentEliminationPass::LiveSet |
Definition at line 96 of file DeadArgumentElimination.h.
| typedef std::multimap<RetOrArg, RetOrArg> llvm::DeadArgumentEliminationPass::UseMap |
Definition at line 79 of file DeadArgumentElimination.h.
Definition at line 104 of file DeadArgumentElimination.h.
Liveness enum - 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 68 of file DeadArgumentElimination.h.
|
inline |
Definition at line 111 of file DeadArgumentElimination.h.
Convenience wrapper.
Definition at line 75 of file DeadArgumentElimination.h.
Convenience wrapper.
Definition at line 71 of file DeadArgumentElimination.h.
| PreservedAnalyses DeadArgumentEliminationPass::run | ( | Module & | M, |
| ModuleAnalysisManager & | |||
| ) |
Definition at line 1032 of file DeadArgumentElimination.cpp.
References llvm::PreservedAnalyses::all(), llvm::Module::begin(), llvm::dbgs(), DEBUG, E, llvm::Module::end(), llvm::Function::getFunctionType(), llvm::FunctionType::isVarArg(), and llvm::PreservedAnalyses::none().
| LiveFuncSet llvm::DeadArgumentEliminationPass::LiveFunctions |
This set contains all values that are cannot be changed in any way.
Definition at line 102 of file DeadArgumentElimination.h.
| LiveSet llvm::DeadArgumentEliminationPass::LiveValues |
This set contains all values that have been determined to be live.
Definition at line 100 of file DeadArgumentElimination.h.
This allows this pass to do double-duty as the dead arg hacking pass (used only by bugpoint).
Definition at line 108 of file DeadArgumentElimination.h.
| 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 94 of file DeadArgumentElimination.h.
1.8.6