]> granicus.if.org Git - llvm/commit
[AVR] Disable register coalescing to the PTRDISPREGS class
authorDylan McKay <me@dylanmckay.io>
Sat, 1 Jun 2019 12:38:56 +0000 (12:38 +0000)
committerDylan McKay <me@dylanmckay.io>
Sat, 1 Jun 2019 12:38:56 +0000 (12:38 +0000)
commitd7e92b55de4abce1ba80749e88ebb4c12d616789
tree5e16f40c84d70f4efe1c8e2915a19390f56d948e
parent0ea813a1e5e7f9a56fb45e1a3000b2edeb2b996d
[AVR] Disable register coalescing to the PTRDISPREGS class

If we would allow register coalescing on PTRDISPREGS class then register
allocator can lock Z register to some virtual register. Larger instructions
requiring a memory acces then fail during the register allocation phase since
there is no available register to hold a pointer if Y register was already
taken for a stack frame. This patch prevents it by keeping Z register
spillable. It does it by not allowing coalescer to lock it.

Original discussion on https://github.com/avr-rust/rust/issues/128.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@362298 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/AVR/AVRRegisterInfo.cpp
lib/Target/AVR/AVRRegisterInfo.h
test/CodeGen/AVR/PR37143.ll
test/CodeGen/AVR/store.ll