[PATCH] D124654: [AIX] Handling the label alignment of a global variable with its multiple aliases.

ChenZheng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 28 02:52:55 PDT 2022


shchenz added a comment.

Thanks. The assembly for PowerPC part looks right now. I have some more comments about the array and vector types.



================
Comment at: llvm/include/llvm/CodeGen/AsmPrinter.h:478
   /// Print a general LLVM constant to the .s file.
-  void emitGlobalConstant(const DataLayout &DL, const Constant *CV);
+  // On AIX, when an alias points to a sub-element of a global variable, the
+  // label of that alias needs to be emitted before the corresponding element.
----------------
Nit: do we need to doc this comment? If so, you may need `///` instead of `//`


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:2369
+    if (auto *RHS = dyn_cast<MCConstantExpr>(CBE->getRHS()))
+      return RHS->getValue();
+  }
----------------
Nit: we may need another `fatal_error` if the second operand is not a constant integer expression.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D124654



More information about the llvm-commits mailing list