[PATCH] D75305: [AIX] Handle LinkOnceODRLinkage and llvm.global_ctors/dtors' AppendingLinkage

Xiangling Liao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 5 07:40:48 PST 2020


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


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1596
 
+  if (isSpecialLLVMGlobalArrayForStaticInit(GV))
+    return;
----------------
hubert.reinterpretcast wrote:
> Should there be a comment indicating why we are not emitting these? Would this be the place where we would add code to handle these instead of emitting them as arrays? In other words, should the comment be a TODO?
Good point.  A `TODO` is necessary. 

> Would this be the place where we would add code to handle these instead of emitting them as arrays?

Based on what I have in mind so far, my own answer is yes. But the final implementation is open to be discussed for sure. 

So I am thinking when we support `.ref` directive in the future for static init, based on the `llvm.global_ctors/llvm.global_dtors` array, this would be the place to add some code to document the relationship (using something like `map` )between object and the sinit/sterm function.  And then later when we emit the .data object[e.g. `t`], we can easily query do we need to and how do we emit `.ref` info for `t`.


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

https://reviews.llvm.org/D75305





More information about the llvm-commits mailing list