[PATCH] D146325: [PowerPC] Add statistics to show the number of entries in the TOC.

Stefan Pintilie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 29 12:31:14 PDT 2023


stefanp added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:708
+  // If we don't do this it comes out as Global.
+  if (MO.getTargetFlags() & PPCII::MO_TLSGDM_FLAG ||
+      MO.getTargetFlags() & PPCII::MO_TLSGD_FLAG)
----------------
amyk wrote:
> Do we not care about the other TLS related target flags (that I suppose are mainly used for Linux)?
> Do we not care about the other TLS related target flags (that I suppose are mainly used for Linux)?

This patch is supposed to count TOC entries for both AIX and Linux. On AIX I expect to see all of the TLS entries in the TOC. However, on Linux the entries are in the GOT or they are accessed directly from the TBSS section. You can take a look at the  test for this patch to get the idea. 

Having said that, I agree that I should add all the rest of the flags here as well. We want to make sure that if there are changes made to AIX in the future they are covered here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D146325



More information about the llvm-commits mailing list