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

Xiangling Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 28 07:28:54 PDT 2019


Xiangling_L marked 2 inline comments as done.
Xiangling_L added inline comments.


================
Comment at: llvm/include/llvm/CodeGen/AsmPrinter.h:116
+  /// at the beginning of each call to runOnMachineFunction().
+  MCSymbol *CurrentFnDescSym = nullptr;
+
----------------
jasonliu wrote:
> For the current patch, we use CurrentFnSym to represent function entry point on AIX, meaning '.' + function name. And we use this new data member to represent function descriptor on AIX. 
> It seems a bit inconsistent with the current usage of CurrentFnSym, as other target seems to use CurrentFnSym for the similar purpose of a function descriptor on AIX.
> And we have a CurrentFnSymForSize down below which seems only used by ELFv1 abi, and the way it is used in code right now seems to match what we want for a function entry point. 
> So I'm wondering if it is possible to use CurrentFnSym to represent function descriptor on AIX, and rename CurrentFnSymForSize to be CurrentFnEntryPoint so that it could use on ELFv1 and AIX. In this way, we could avoid creating another target specific data member, and have a more general MCSymbol for this similar kind of purpose. 
> 
The CurrentFnSym is supposed to be used as the entry point of function on all targets. This patch follows this convention, so a new symbol CurrentFnDescSym is created for AIX.


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