[PATCH] D11463: [AArch64] Define subtarget feature "reserve-x18"

Eric Christopher echristo at gmail.com
Mon Jul 27 10:03:01 PDT 2015


On Mon, Jul 27, 2015 at 10:02 AM Akira Hatanaka <ahatanak at gmail.com> wrote:

> ahatanak added inline comments.
>
> ================
> Comment at: lib/Target/AArch64/AArch64RegisterInfo.cpp:402-403
> @@ -404,4 +401,4 @@
>      return 32 - 1                                // XZR/SP
> -           - (TFI->hasFP(MF) || TT.isOSDarwin()) // FP
> -           - (TT.isOSDarwin() || ReserveX18) // X18 reserved as platform
> register
> -           - hasBasePointer(MF);           // X19
> +      - (TFI->hasFP(MF) || TT.isOSDarwin()) // FP
> +      - (TT.isOSDarwin() ||
> +         MF.getSubtarget<AArch64Subtarget>()
> ----------------
> echristo wrote:
> > I wonder if the isOSDarwin parts here necessarily need to be here -
> should be able to fold them into either a) the subtarget feature existing,
> or b) the query in TFI?
> Yes, either the front-end should pass reserve-x18 if the target is darwin
> or we should have a function in subtarget or TFI that returns
> (isOSDDarwin() || isX18Reserved()).
>

Preferably the former.

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150727/d7faa6a7/attachment.html>


More information about the llvm-commits mailing list