efriedma added a comment.

> A reserved physical register doesn't mean it can't be used by 
> compiler/linker, it just means it can't be used by register allocator, see 
> the comments in TargetRegisterInfo::getReservedRegs().

The target feature to "reserve" a register is meant to be "don't use this 
register for anything".  For some registers, making sure the register isn't 
used by the register allocator is sufficient because the compiler/linker won't 
use them in any other way... but if the compiler uses a register outside 
register allocation, that doesn't work.

If you want a target feature to simulate high register pressure without any 
expectation that the resulting code actually works, please add a separate 
"regalloc-test-reserve-all-regs" feature or something like that.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D132531/new/

https://reviews.llvm.org/D132531

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to