20 #ifndef LLVM_TRANSFORMS_IPO_DEADARGUMENTELIMINATION_H
21 #define LLVM_TRANSFORMS_IPO_DEADARGUMENTELIMINATION_H
41 : F(F), Idx(Idx), IsArg(IsArg) {}
79 typedef std::multimap<RetOrArg, RetOrArg>
UseMap;
118 unsigned RetValNum = -1U);
122 void MarkValue(
const RetOrArg &RA,
Liveness L,
124 void MarkLive(
const RetOrArg &RA);
126 void PropagateLiveness(
const RetOrArg &RA);
127 bool RemoveDeadStuffFromFunction(
Function *
F);
128 bool DeleteDeadVarargs(
Function &Fn);
129 bool RemoveDeadArgumentsFromCallers(
Function &Fn);
133 #endif // LLVM_TRANSFORMS_IPO_DEADARGUMENTELIMINATION_H
Struct that represents (part of) either a return value or a function argument.
Eliminate dead arguments (and return values) from functions.
A Module instance is used to store all the information related to an LLVM module. ...
RetOrArg CreateArg(const Function *F, unsigned Idx)
Convenience wrapper.
LiveSet LiveValues
This set contains all values that have been determined to be live.
StringRef getName() const
Return a constant reference to the value's name.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
A Use represents the edge between a Value definition and its users.
A CRTP mix-in to automatically provide informational APIs needed for passes.
A set of analyses that are preserved following a run of a transformation pass.
bool operator==(const RetOrArg &O) const
Make RetOrArg comparable, so we can easily iterate the multimap.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
Module.h This file contains the declarations for the Module class.
std::set< RetOrArg > LiveSet
UseMap Uses
This maps a return value or argument to any MaybeLive return values or arguments it uses...
LiveFuncSet LiveFunctions
This set contains all values that are cannot be changed in any way.
RetOrArg CreateRet(const Function *F, unsigned Idx)
Convenience wrapper.
std::string getDescription() const
std::set< const Function * > LiveFuncSet
bool ShouldHackArguments
This allows this pass to do double-duty as the dead arg hacking pass (used only by bugpoint)...
DeadArgumentEliminationPass(bool ShouldHackArguments_=false)
std::multimap< RetOrArg, RetOrArg > UseMap
RetOrArg(const Function *F, unsigned Idx, bool IsArg)
SmallVector< RetOrArg, 5 > UseVector
Liveness
Liveness enum - During our initial pass over the program, we determine that things are either alive o...
LLVM Value Representation.
bool operator<(const RetOrArg &O) const
Make RetOrArg comparable, so we can put it into a map.
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.
PreservedAnalyses run(Module &M, ModuleAnalysisManager &)