[PATCH] D50694: [Sparc] Give the option to use the OS reserved global registers

Daniel Cederman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 15 02:11:44 PDT 2018


dcederman added inline comments.


================
Comment at: lib/Target/Sparc/Sparc.td:63
 
+def ReserveRegG2 : SubtargetFeature<"reserve-reg-g2", "ReserveRegG2", "true",
+                                    "Reserve use of register %g2">;
----------------
jyknight wrote:
> Having some use 'reserve', and some use 'use' seems unfortunate. If, instead, they're all spelled "reserve-reg-*", but the features for G5 (sometimes), G6, and G7 are enabled by default, I *think* it would then be possible to disable them with "target-features"="-reserve-reg-g5".
Agreed. I did it like that to avoid having to add the features to each processor definition. But now I see on other targets that it is OK to extend the feature string in initializeSubtargetDependencies, so I'll take that approach.


https://reviews.llvm.org/D50694





More information about the llvm-commits mailing list