20 #ifndef LLVM_TRANSFORMS_IPO_DEADARGUMENTELIMINATION_H 21 #define LLVM_TRANSFORMS_IPO_DEADARGUMENTELIMINATION_H 51 : F(F), Idx(Idx), IsArg(IsArg) {}
55 return std::tie(F, Idx, IsArg) < std::tie(O.
F, O.
Idx, O.
IsArg);
60 return F == O.
F && Idx == O.
Idx && IsArg == O.
IsArg;
64 return (
Twine(IsArg ?
"Argument #" :
"Return value #") +
Twine(Idx) +
92 using UseMap = std::multimap<RetOrArg, RetOrArg>;
128 unsigned RetValNum = -1U);
137 bool RemoveDeadStuffFromFunction(
Function *
F);
138 bool DeleteDeadVarargs(
Function &Fn);
139 bool RemoveDeadArgumentsFromCallers(
Function &Fn);
144 #endif // LLVM_TRANSFORMS_IPO_DEADARGUMENTELIMINATION_H Struct that represents (part of) either a return value or a function argument.
std::multimap< RetOrArg, RetOrArg > UseMap
Eliminate dead arguments (and return values) from functions.
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
bool operator<(const RetOrArg &O) const
Make RetOrArg comparable, so we can put it into a map.
RetOrArg CreateArg(const Function *F, unsigned Idx)
Convenience wrapper.
LiveSet LiveValues
This set contains all values that have been determined to be live.
bool operator==(const RetOrArg &O) const
Make RetOrArg comparable, so we can easily iterate the multimap.
std::string getDescription() const
SI optimize exec mask operations pre RA
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.
std::set< RetOrArg > LiveSet
A set of analyses that are preserved following a run of a transformation pass.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small...
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.
StringRef getName() const
Return a constant reference to the value's name.
bool ShouldHackArguments
This allows this pass to do double-duty as the dead arg hacking pass (used only by bugpoint)...
DeadArgumentEliminationPass(bool ShouldHackArguments_=false)
RetOrArg(const Function *F, unsigned Idx, bool IsArg)
Liveness
Liveness enum - During our initial pass over the program, we determine that things are either alive o...
LLVM Value Representation.
std::set< const Function * > LiveFuncSet
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 &)