[PATCH] D32564: AArch64: compress jump tables to minimum size needed to reach destinations

Evandro Menezes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 9 13:40:18 PDT 2018


evandro added a comment.

In https://reviews.llvm.org/D32564#1259155, @jfb wrote:

> Do you have specific worries? Or at least a timeline? Seems the patch can be reviewed without waiting for your exploration.


Yes, I do.  Exynos limits the size of jump tables, resulting in a daisy chain of smaller jump tables.  This patch changes the jump table code, so I'd like to evaluate the performance impact, unless this pass is gated by `-Os`.



================
Comment at: llvm/lib/Target/AArch64/AArch64AsmPrinter.cpp:519
+      MF->getInfo<AArch64FunctionInfo>()->getJumpTableEntryPCRelSymbol(JTIdx);
+  EmitToStreamer(OutStreamer, MCInstBuilder(AArch64::ADR)
+                                  .addReg(DestReg)
----------------
It seems to me that this instruction could be moved after the load below to promote macro fusion.


Repository:
  rL LLVM

https://reviews.llvm.org/D32564





More information about the llvm-commits mailing list