-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Regalloc basic asserts with "Interference after spill." #32404
Comments
Looking at the regalloc dump I see this: Thus, vreg123 interferes with vreg96. However, vreg96 is an empty live-range so it shouldn't interfere to being with. Going pass this shock, the fact that vreg96 is empty implies that the liveregmatrix does not need to update anything when unassigning it. Therefore the interference stays and boom! The bottom line is why this vreg96 live-range didn't get removed from the liveregmatrix. |
I found it suspicious that RABasic is not a delegate of LiveRangeEdit. |
Possible fix The proper way to fix that is IMHO to do that in the base class so that we don't duplicate the code between RABasic and RAGreedy. |
One problem with the proposed fix is that it changes the behavior of the basic allocator. Now, each time a register live-range is shrunk, the live-range is re-queued for assignment. Previously we would shrink the live-range but not give back the register for the holes we created.
I am guessing that's not too concerning.
Right now, we cannot do #3 because of: Because of #B, I don't think we should try to fix that. |
It seems all good to me, but I think someone with more insight should be the reviewer. |
Don't worry, I'll commit shortly, I need to clean-up the test case. (Producing the mir and adding check lines.) |
Fixed in r304603. |
Extended Description
llc -mtriple=s390x-linux-gnu -mcpu=z13 -disable-cgp -disable-machine-dce -regalloc=basic -o /dev/null ./tc_regallocbasic.ll
llc: llvm/lib/CodeGen/RegAllocBasic.cpp:253: virtual unsigned int {anonymous}::RABasic::selectOrSplit(llvm::LiveInterval&, llvm::SmallVectorImpl&): Assertion `!Matrix->checkInterference(VirtReg, *PhysRegI) && "Interference after spill."' failed.
The text was updated successfully, but these errors were encountered: