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

Francis Visoiu Mistrih via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 3 14:43:30 PST 2020


thegameg marked 9 inline comments as done.
thegameg 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;
----------------
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.


================
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:
> 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.


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

https://reviews.llvm.org/D73805





More information about the llvm-commits mailing list