-
Notifications
You must be signed in to change notification settings - Fork 1
c-print-results
: Different spill order of arguments
#291
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The cause behind the different live interval weights are probably some gaps inside the slot numbering, because of different instruction removals that precede AArch64:
X86:
The last instructions seem further apart in the two architectures, even though they aren't. This could be fixed by "packing" the slot indexes of instructions right before |
An attempt for that is already underway in LLVM, which we will try to add to our LLVM as well: |
Applies: llvm#66334 llvm#67038 Packing the slot indexes before register allocation is useful for us because it evens the gaps between slots after all the optimization passes that happen before `greedy` and may have removed a different number of instructions between AArch64 and X86. This leads to different slot gaps and, hence, slightly different regalloc in some cases. We backport the above patches for our LLVM, with the main difference being the absence of some convenient data structure iterators, which we had to convert to be compatible with our ADT infrastructure. We add the `-pack-indexes` flag to activate this. Addressses: systems-nuts/unifico#291
Uh oh!
There was an error while loading. Please reload this page.
Examining the
regalloc
debug info, we see that the following corresponding registers are allocated differently. This is because of different live interval weights (calculated asUseDefFreq / (Size + 25*SlotIndex::InstrDist)
) that lead to different evictions:AArch64
X86
The text was updated successfully, but these errors were encountered: