[PATCH] D49237: [PPC64] Optimize redundant instructions using R_PPC64_TOC16_HA in nop

Rui Ueyama via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 14 13:12:53 PDT 2018


ruiu added inline comments.


================
Comment at: ELF/Arch/PPC64.cpp:628
+      uint32_t Instr = readInstrFromHalf16(Loc);
+      if (isInstructionUpdateForm(Instr)) {
+        error(getErrorLocation(Loc) +
----------------
nit: you can omit {}.


================
Comment at: ELF/Arch/PPC64.cpp:649
+      // pointer register r2, as the base register.
+      if (isInstructionUpdateForm(Inst)) {
+        error(getErrorLocation(Loc) +
----------------
Ditot


================
Comment at: ELF/Driver.cpp:287-288
+
+    if (Args.hasArg(OPT_no_toc_optimize))
+      error("--no-toc-optimize is only supported on the PowerPC64 target.");
+  }
----------------
ruiu wrote:
> It is indeed true that --no-toc-optimize is PPC64 only, but in other test patterns we don't care about that kind of negative flags. I'd check if `Config->TocOptimize` is true.
What about this?


Repository:
  rL LLVM

https://reviews.llvm.org/D49237





More information about the llvm-commits mailing list