mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-20 09:24:58 +00:00
Split DAE::MarkLive into MarkLive and PropagateLiveness.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@53600 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6cdd54b6f7
commit
3015652473
@ -134,6 +134,7 @@ namespace {
|
|||||||
const UseVector &MaybeLiveUses);
|
const UseVector &MaybeLiveUses);
|
||||||
void MarkLive(const RetOrArg &RA);
|
void MarkLive(const RetOrArg &RA);
|
||||||
void MarkLive(const Function &F);
|
void MarkLive(const Function &F);
|
||||||
|
void PropagateLiveness(const RetOrArg &RA);
|
||||||
bool RemoveDeadStuffFromFunction(Function *F);
|
bool RemoveDeadStuffFromFunction(Function *F);
|
||||||
bool DeleteDeadVarargs(Function &Fn);
|
bool DeleteDeadVarargs(Function &Fn);
|
||||||
};
|
};
|
||||||
@ -545,7 +546,12 @@ void DAE::MarkLive(const RetOrArg &RA) {
|
|||||||
return; // We were already marked Live.
|
return; // We were already marked Live.
|
||||||
|
|
||||||
DOUT << "DAE - Marking " << RA.getDescription() << " live\n";
|
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
|
// 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
|
// 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.
|
// not belonging to RA) to become erased and the iterator invalidated.
|
||||||
|
Loading…
Reference in New Issue
Block a user