mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-11-24 23:19:03 +00:00
avoid unnecessary direct access to LiveInterval::ranges
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190170 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -527,11 +527,11 @@ bool RegisterCoalescer::hasOtherReachingDefs(LiveInterval &IntA,
|
||||
for (LiveInterval::iterator AI = IntA.begin(), AE = IntA.end();
|
||||
AI != AE; ++AI) {
|
||||
if (AI->valno != AValNo) continue;
|
||||
LiveInterval::Ranges::iterator BI =
|
||||
std::upper_bound(IntB.ranges.begin(), IntB.ranges.end(), AI->start);
|
||||
if (BI != IntB.ranges.begin())
|
||||
LiveInterval::iterator BI =
|
||||
std::upper_bound(IntB.begin(), IntB.end(), AI->start);
|
||||
if (BI != IntB.begin())
|
||||
--BI;
|
||||
for (; BI != IntB.ranges.end() && AI->end >= BI->start; ++BI) {
|
||||
for (; BI != IntB.end() && AI->end >= BI->start; ++BI) {
|
||||
if (BI->valno == BValNo)
|
||||
continue;
|
||||
if (BI->start <= AI->start && BI->end > AI->start)
|
||||
@@ -1089,8 +1089,8 @@ bool RegisterCoalescer::joinCopy(MachineInstr *CopyMI, bool &Again) {
|
||||
});
|
||||
|
||||
// When possible, let DstReg be the larger interval.
|
||||
if (!CP.isPartial() && LIS->getInterval(CP.getSrcReg()).ranges.size() >
|
||||
LIS->getInterval(CP.getDstReg()).ranges.size())
|
||||
if (!CP.isPartial() && LIS->getInterval(CP.getSrcReg()).size() >
|
||||
LIS->getInterval(CP.getDstReg()).size())
|
||||
CP.flip();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user