[PATCH] D137230: [XCOFF] avoid unnecessary Fixups when -function-sections is enabled.

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 12 14:31:26 PST 2022


hubert.reinterpretcast added inline comments.


================
Comment at: llvm/lib/MC/MCContext.cpp:831
 
+  if (!IsDwarfSec && CsectProp->MappingClass == XCOFF::XMC_PR)
+    QualName->setFragment(F);
----------------
The change looks reasonable, but I don't think it should be restricted to `XMC_PR` csects.

If we are being conservative about making changes, then let's leave a comment to say that the check for `XMC_PR` is here just because we don't have other cases that hit this problem yet.

We will probably find more to do if we can get the assembly parsing to resolve qualnames.


================
Comment at: llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll:11
+; RUN:     -filetype=obj -o %t32.o < %s
+; RUN: llvm-objdump --syms --reloc %t32.o | FileCheck --check-prefix=XCOFF32 %s
+
----------------
Please use `--symbol-description` and update the checks to expect the storage mapping class.


================
Comment at: llvm/test/CodeGen/PowerPC/aix-xcoff-funcsect.ll:16
+; RUN:     -filetype=obj -o %t.o < %s
+; RUN: llvm-objdump --syms --reloc %t.o | FileCheck --check-prefix=XCOFF64 %s
+
----------------
DiggerLin wrote:
> nit: change %t64.o
Same comment: Please use `--symbol-description` and update the checks to expect the storage mapping class.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D137230



More information about the llvm-commits mailing list