[llvm-commits] [llvm] r53599 - /llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Matthijs Kooijman
matthijs at stdin.nl
Tue Jul 15 01:56:49 PDT 2008
Author: matthijs
Date: Tue Jul 15 03:56:49 2008
New Revision: 53599
URL: http://llvm.org/viewvc/llvm-project?rev=53599&view=rev
Log:
Pass around const RetOrArg references instead of copying values. Also, mark
RetOrArg::getDescription() as const.
Modified:
llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Modified: llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp?rev=53599&r1=53598&r2=53599&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Tue Jul 15 03:56:49 2008
@@ -70,7 +70,7 @@
return F == O.F && Idx == O.Idx && IsArg == O.IsArg;
}
- std::string getDescription() {
+ std::string getDescription() const {
return std::string((IsArg ? "Argument #" : "Return value #"))
+ utostr(Idx) + " of function " + F->getName();
}
@@ -132,7 +132,7 @@
void SurveyFunction(Function &F);
void MarkValue(const RetOrArg &RA, Liveness L,
const UseVector &MaybeLiveUses);
- void MarkLive(RetOrArg RA);
+ void MarkLive(const RetOrArg &RA);
void MarkLive(const Function &F);
bool RemoveDeadStuffFromFunction(Function *F);
bool DeleteDeadVarargs(Function &Fn);
@@ -540,7 +540,7 @@
/// MarkLive - Mark the given return value or argument as live. Additionally,
/// mark any values that are used by this value (according to Uses) live as
/// well.
-void DAE::MarkLive(RetOrArg RA) {
+void DAE::MarkLive(const RetOrArg &RA) {
if (!LiveValues.insert(RA).second)
return; // We were already marked Live.
More information about the llvm-commits
mailing list