mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-23 01:24:30 +00:00
Stabilize the order of live intervals in the priority_queue used by the
linear scan reg alloc. This fixes a problem I ran into where extracting a function from a larger file caused the generated code to change (masking the problem I was trying to debug) because the allocator behaved differently. This changes the results for two X86 regression checks. stack-color-with-reg is improved, with one less instruction, but pr3495 is worse, with one more copy. As far as I can tell, these tests were just getting lucky or unlucky, so I've changed the expected results. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81060 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -774,7 +774,10 @@ namespace llvm {
|
||||
void ComputeJoinedWeight(const LiveInterval &Other);
|
||||
|
||||
bool operator<(const LiveInterval& other) const {
|
||||
return beginIndex() < other.beginIndex();
|
||||
const MachineInstrIndex &thisIndex = beginIndex();
|
||||
const MachineInstrIndex &otherIndex = other.beginIndex();
|
||||
return (thisIndex < otherIndex ||
|
||||
(thisIndex == otherIndex && reg < other.reg));
|
||||
}
|
||||
|
||||
void print(raw_ostream &OS, const TargetRegisterInfo *TRI = 0) const;
|
||||
|
Reference in New Issue
Block a user