[all-commits] [llvm/llvm-project] 365978: MachineModuleInfo: Remove UsesMorestackAddr

Matt Arsenault via All-commits all-commits at lists.llvm.org
Wed Apr 20 08:10:36 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3659780d58722ea38adf25f7116151f2ecf2d521
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-04-20 (Wed, 20 Apr 2022)

  Changed paths:
    M llvm/include/llvm/CodeGen/MachineModuleInfo.h
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
    M llvm/lib/CodeGen/MachineModuleInfo.cpp
    M llvm/lib/Target/X86/X86AsmPrinter.cpp
    M llvm/lib/Target/X86/X86FrameLowering.cpp
    A llvm/test/CodeGen/X86/morestack-decl.ll
    M llvm/test/CodeGen/X86/segmented-stacks.ll

  Log Message:
  MachineModuleInfo: Remove UsesMorestackAddr

This is x86 specific, and adds statefulness to
MachineModuleInfo. Instead of explicitly tracking this, infer if we
need to declare the symbol based on the reference previously inserted.

This produces a small change in the output due to the move from
AsmPrinter::doFinalization to X86's emitEndOfAsmFile. This will now be
moved relative to other end of file fields, which I'm assuming doesn't
matter (e.g. the __morestack_addr declaration is now after the
.note.GNU-split-stack part)

This also produces another small change in code if the module happened
to define/declare __morestack_addr, but I assume that's invalid and
doesn't really matter.

More information about the All-commits mailing list