<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr">On Mon, Jul 27, 2015 at 10:02 AM Akira Hatanaka <<a href="mailto:ahatanak@gmail.com">ahatanak@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">ahatanak added inline comments.<br>
<br>
================<br>
Comment at: lib/Target/AArch64/AArch64RegisterInfo.cpp:402-403<br>
@@ -404,4 +401,4 @@<br>
     return 32 - 1                                // XZR/SP<br>
-           - (TFI->hasFP(MF) || TT.isOSDarwin()) // FP<br>
-           - (TT.isOSDarwin() || ReserveX18) // X18 reserved as platform register<br>
-           - hasBasePointer(MF);           // X19<br>
+      - (TFI->hasFP(MF) || TT.isOSDarwin()) // FP<br>
+      - (TT.isOSDarwin() ||<br>
+         MF.getSubtarget<AArch64Subtarget>()<br>
----------------<br>
echristo wrote:<br>
> 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?<br>
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()).<br></blockquote><div><br></div><div>Preferably the former.</div><div><br></div><div>-eric </div></div></div>