https://llvm.org/bugs/show_bug.cgi?id=31349
Bug ID: 31349 Summary: Don't "double allocate" the Y pointer register when there is a stack spill Product: libraries Version: trunk Hardware: PC OS: All Status: NEW Severity: normal Priority: P Component: Backend: AVR Assignee: unassignedb...@nondot.org Reporter: dylanmcka...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified Currently, we always allow the 'Y' register to be allocated in all of the instructions it can be used with. In functions which do not spill registers, this is absolutely fine and there are no issues. In functions which DO spill registers, the Y register is used to store the frame pointer. It will be stored here even if the Y register has already been allocated for existing live intervals within the function. This means that we can clobber Y without restoring and then use the clobbered value in the same function. We previously had a hack (before this backend was upstreamed) that would teach the register allocator that if it generates the first spill in a function, it will rewind allocation to the start of the function and then mark 'Y' as a reserved register. It would then reallocate the function and there would be no "overlaps" of the Y register. We will need to come up with a proper fix, as this is likely to break many programs currently. Raised from PR31346. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs