[PATCH] D73805: [AArch64] Provide Darwin variants of most calling conventions

Amara Emerson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 15:14:27 PST 2020


aemerson added inline comments.


================
Comment at: llvm/lib/Target/AArch64/AArch64RegisterInfo.cpp:65-67
     return MF->getInfo<AArch64FunctionInfo>()->isSplitCSR() ?
            CSR_AArch64_CXX_TLS_Darwin_PE_SaveList :
            CSR_AArch64_CXX_TLS_Darwin_SaveList;
----------------
thegameg wrote:
> thegameg wrote:
> > aemerson wrote:
> > > paquette wrote:
> > > > Should we be returning Darwin anything from here if we're moving all of the Darwin-specific code to a new function? Is this actually Darwin-specific?
> > > We can get the Subtarget from MF right? Why not just keep the one getCalleeSavedRegs() and put the separate variants inside here?
> > I don't think there is anything preventing other platforms for using `CXX_FAST_TLS`, but I could `report_fatal_error` and move it to the Darwin-specific call.
> I chose to extract it in a separate function for readability. If you believe that it's easier to keep it in one function I can make that change.
You can just do the check here and if it's darwin call the (static) getDarwinCalleeSavedRegs(). That way the call sites won't need to be modified.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D73805/new/

https://reviews.llvm.org/D73805





More information about the llvm-commits mailing list