[PATCH] D70461: [AIX] Emit TOC entries for ASM printing

David Tenty via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 21 08:16:12 PST 2019


daltenty marked an inline comment as done.
daltenty added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1848
+  for (auto &I : TOC) {
+    OutStreamer->EmitLabel(I.second);
+    TS.emitTCEntry(*I.first);
----------------
jasonliu wrote:
> TC entry itself is a csect. Do we need to create that csect(MCSectionXCOFF) and do a SwitchSection for every TC entry?
> Otherwise, I will need some help on understanding how to implement object file generation for TC entry. 
I agree, this needs to be revised.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1858
+    if (GV) {
+      ValidateGV(GV);
+      if (GV->hasInitializer()) {
----------------
jasonliu wrote:
> If we are going to call EmitGlobalVariable for every GV, do we need to ValidateGV twice here? Or are there situations that we would call getMCSymbolForTOCPseudoMO for a particular GV that is not going to be checked in EmitGlobalVariable?
The problem is that this will be called before EmitGlobalVariable, so we need to filter them here so we don't try to handle unsupported cases like thread locals, etc.  But fatal erroring them here will not necessarily cover all the cases where we might emit them, since this will only cover those we have TOC references for, thus I believe we should cover both.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D70461





More information about the llvm-commits mailing list