[PATCH] D68341: [AIX] TOC pseudo expansion for 64bit large + 64bit small + 32bit large modes

Sean Fertile via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 6 19:06:04 PDT 2019


sfertile added inline comments.


================
Comment at: llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.cpp:80
+
+    const MCSymbolRefExpr *SRE =
+        dyn_cast<MCSymbolRefExpr>(MI->getOperand(2).getExpr());
----------------
SRE is only used in an assert, which will introduce an unused local warning when asserts are disabled.


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:516
+// Map the machine operand to its corresponding MCSymbol.
+static MCSymbol *getMCSymbolForMO(const MachineOperand &MO, AsmPrinter &AP) {
+    if (MO.isGlobal())
----------------
Should we try to include 'TOC' in the name since this is specifically for mapping the TOC pseudos symbol ref operand into an MCSymbol?


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:732
   case PPC::LDtoc: {
+    assert (!isDarwin && "TOC is an ELF/XCOFF construct");
+
----------------
`isDarwin` --> `IsDarwin`. (There are a couple places in `EmitInstruction` that will need to be updated similarly)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D68341





More information about the llvm-commits mailing list