mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-26 07:16:39 +00:00
Use properlyDominates in RDFLiveness when sorting on dominance.
Summary: When looking for all reaching definitions, we sort basic blocks on dominance. When sorting looking for properlyDominates() handles the case A == B. Authored by: pranavb Differential Revision: https://reviews.llvm.org/D86661
This commit is contained in:
parent
cf37209c05
commit
9e04c74adc
@ -230,13 +230,12 @@ NodeList Liveness::getAllReachingDefs(RegisterRef RefRR,
|
||||
TmpBB.push_back(Bucket.first);
|
||||
if (Bucket.second.size() > 2)
|
||||
GetOrder(*Bucket.first);
|
||||
std::sort(Bucket.second.begin(), Bucket.second.end(), Precedes);
|
||||
llvm::sort(Bucket.second.begin(), Bucket.second.end(), Precedes);
|
||||
}
|
||||
|
||||
// Sort the blocks with respect to dominance.
|
||||
std::sort(TmpBB.begin(), TmpBB.end(), [this](auto A, auto B) {
|
||||
return MDT.dominates(A, B);
|
||||
});
|
||||
llvm::sort(TmpBB.begin(), TmpBB.end(),
|
||||
[this](auto A, auto B) { return MDT.properlyDominates(A, B); });
|
||||
|
||||
std::vector<NodeId> TmpInst;
|
||||
for (auto I = TmpBB.rbegin(), E = TmpBB.rend(); I != E; ++I) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user