[PATCH] D59799: [wip][mips] Use AltOrders to prevent using odd FP-registers

Petar Avramovic via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 26 10:49:24 PDT 2019


Petar.Avramovic added a comment.

I don't see other reason for registers form `OddSPRegClass` to be declared as as Reserved other then to affect Allocation order in register allocation.
>From description of nooddspreg : "Disable odd numbered single-precision registers". I would say that we only need to make sure that odd float registers can't be used during register allocation that is to affect Allocation order in some way to make sure odd registers don't appear there. I saw that similar problem for msa was handled with use of different register class (`MSA128WRegClass` or `MSA128WEvensRegClass`) in `MipsSETargetLowering::emitCOPY_FW`.
Here this is done with `AltOrders` without having to define registers from `OddSPRegClass` as Reserved. MipsGenRegisterInfo.inc also got smaller, everything looks good from my side.

What I don't really understand purpose of the affected test, it forces use of $f13 with asm instruction despite the fact it is disabled with +nooddspreg option. Shouldn't we just report an error that odd register can't be used with +nooddspreg?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D59799





More information about the llvm-commits mailing list