From 3659780d58722ea38adf25f7116151f2ecf2d521 Mon Sep 17 00:00:00 2001 From: Matt Arsenault Date: Sun, 17 Apr 2022 15:45:20 -0400 Subject: 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. --- llvm/lib/CodeGen/MachineModuleInfo.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'llvm/lib/CodeGen/MachineModuleInfo.cpp') diff --git a/llvm/lib/CodeGen/MachineModuleInfo.cpp b/llvm/lib/CodeGen/MachineModuleInfo.cpp index 1e1b9e9..7b96a31 100644 --- a/llvm/lib/CodeGen/MachineModuleInfo.cpp +++ b/llvm/lib/CodeGen/MachineModuleInfo.cpp @@ -202,7 +202,7 @@ void MachineModuleInfo::initialize() { ObjFileMMI = nullptr; CurCallSite = 0; NextFnNum = 0; - UsesMSVCFloatingPoint = UsesMorestackAddr = false; + UsesMSVCFloatingPoint = false; AddrLabelSymbols = nullptr; DbgInfoAvailable = false; } @@ -230,7 +230,6 @@ MachineModuleInfo::MachineModuleInfo(MachineModuleInfo &&MMI) ObjFileMMI = MMI.ObjFileMMI; CurCallSite = MMI.CurCallSite; UsesMSVCFloatingPoint = MMI.UsesMSVCFloatingPoint; - UsesMorestackAddr = MMI.UsesMorestackAddr; AddrLabelSymbols = MMI.AddrLabelSymbols; ExternalContext = MMI.ExternalContext; TheModule = MMI.TheModule; -- cgit v1.1