[PATCH] D123934: MachineModuleInfo: Remove UsesMorestackAddr
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 20 08:00:16 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/lib/Target/X86/X86AsmPrinter.cpp:832
+ // Emit __morestack address if needed for indirect calls.
+ if (TT.getArch() == Triple::x86_64 && TM.getCodeModel() == CodeModel::Large) {
+ if (MCSymbol *AddrSymbol = OutContext.lookupSymbol("__morestack_addr")) {
----------------
rnk wrote:
> arsenm wrote:
> > rnk wrote:
> > > I suggest `getSubtarget().is64Bit()` instead of `TT.getArch() == ...x86_64`, it's marginally more explicit. My first (silly) thought was "why are we checking if we're targetting x86, we are already in the x86 backend... oh right, we don't do this for 32-bit".
> > This is in module level code. There's not supposed to be a subtarget
> Got it, sounds fine then. I only got as far as confirming that `X86AsmPrinter::getSubtarget` exists. I never liked the `TT.is64BitArch()` predicates, those always seemed silly.
The short version is it does exist, but it shouldn't.
I've never understood why x86 has these predicates on the subtarget
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D123934/new/
https://reviews.llvm.org/D123934
More information about the llvm-commits
mailing list