[PATCH] D66724: [AIX]Emit function descriptor csect in assembly

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 11:33:41 PDT 2019


jasonliu added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1740
+  // Switch to section to emit TOC-base.
+  OutStreamer->SwitchSection(TOCAnchor);
+}
----------------
We would emit the TOC anchor every time even if we don't need it.
I think we should do the SwitchSection in EmitEndOfAsmFile. We would only emit TOC anchor if there is a function definition in the module. 
Then a later on patch could implement the emitTCEntry in that same function. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D66724





More information about the llvm-commits mailing list