[clang] [llvm] [Hexagon] Allow reservation of caller saved registers via -ffixed-rXX (PR #205733)

Santanu Das via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 2 00:37:38 PDT 2026


================
@@ -206,6 +206,8 @@ BitVector HexagonRegisterInfo::getReservedRegs(const MachineFunction &MF)
     Reserved.set(Reg);
 
   static const MCPhysReg RRegs[] = {
+      Hexagon::R6,  Hexagon::R7,  Hexagon::R8,  Hexagon::R9,  Hexagon::R10,
----------------
quic-santdas wrote:

The responsibility of reserving the register lies with the user, as stated in the commit message. I hope when the user types "-ffixed-r6" he/she knows what they are doing. However, it is a good idea to warn this to the user that they are using a caller saved register. Let me push a patch with the warning.

https://github.com/llvm/llvm-project/pull/205733


More information about the cfe-commits mailing list