[PATCH] D145131: [Arm][AArch64] Setting IsX18ReservedByDefault() to true for Unknown OSes

Benoit Jacob via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 2 07:22:47 PST 2023


Benoit added a comment.

In D145131#4164239 <https://reviews.llvm.org/D145131#4164239>, @pratlucas wrote:

> As @DavidSpickett mentioned above, there are existing command line options that allow the user to opt-in to this behaviour, as recommended by the AAPCS64 document when creating platform-independent code:
>
>> Software developers creating platform-independent code are advised to avoid using r18 if at all possible. Most compilers provide a mechanism to prevent specific registers from being used for general allocation;

It isn't ideal that such an important opt-in isn't more discoverable --- most users only learn about this whole topic after debugging for hours the consequences of using x18 :-)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145131



More information about the llvm-commits mailing list