carwil added a comment. In D68862#1708132 <https://reviews.llvm.org/D68862#1708132>, @chill wrote:
> In D68862#1708079 <https://reviews.llvm.org/D68862#1708079>, @carwil wrote: > > > > IMHO, since reserved registes are per-function, this strongly suggests > > > implementation as function attribute(s), rather than subtarget features > > > (also for the pre-existing r9). > > > > What do you mean reserved registers are per-function? That sounds like > > you're describing local register variables, which I don't believe Clang has > > any support for (and there aren't a great deal of use-cases for anyway). > > We're specifically talking about global usage here. > > > I mean that the set is dynamically computed and depends on the specific > function: cf. > https://github.com/llvm/llvm-project/blob/master/llvm/lib/Target/ARM/ARMBaseRegisterInfo.cpp#L184 > as opposed to, say, depend only on target/subtarget/abi. Ah, I see. That's a fair comment. AArch64 also achieves it's -reserve-xN options via subtarget features (despite function context), I think that's where the inspiration/suggestion for doing it this way in the ARM backend came from. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68862/new/ https://reviews.llvm.org/D68862 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits