[llvm-commits] [llvm] r53600 - /llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp
Matthijs Kooijman
matthijs at stdin.nl
Tue Jul 15 02:00:17 PDT 2008
Author: matthijs
Date: Tue Jul 15 04:00:17 2008
New Revision: 53600
URL: http://llvm.org/viewvc/llvm-project?rev=53600&view=rev
Log:
Split DAE::MarkLive into MarkLive and PropagateLiveness.
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=53600&r1=53599&r2=53600&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/DeadArgumentElimination.cpp Tue Jul 15 04:00:17 2008
@@ -134,6 +134,7 @@
const UseVector &MaybeLiveUses);
void MarkLive(const RetOrArg &RA);
void MarkLive(const Function &F);
+ void PropagateLiveness(const RetOrArg &RA);
bool RemoveDeadStuffFromFunction(Function *F);
bool DeleteDeadVarargs(Function &Fn);
};
@@ -545,7 +546,12 @@
return; // We were already marked Live.
DOUT << "DAE - Marking " << RA.getDescription() << " live\n";
+ PropagateLiveness(RA);
+}
+/// PropagateLiveness - Given that RA is a live value, propagate it's liveness
+/// to any other values it uses (according to Uses).
+void DAE::PropagateLiveness(const RetOrArg &RA) {
// We don't use upper_bound (or equal_range) here, because our recursive call
// to ourselves is likely to cause the upper_bound (which is the first value
// not belonging to RA) to become erased and the iterator invalidated.
More information about the llvm-commits
mailing list