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

Akira Hatanaka ahatanak at gmail.com
Mon Jul 27 10:02:02 PDT 2015


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()).


Repository:
  rL LLVM

http://reviews.llvm.org/D11463







More information about the llvm-commits mailing list