[PATCH] D26779: Use 32bit jump table entries for AArch64

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 12:26:28 PST 2016


t.p.northover added a comment.

Thanks for working on this. I think the approach is good, so just have a couple of minor comments on the implementation:



================
Comment at: lib/Target/AArch64/AArch64ISelLowering.cpp:2322
+    return TargetLowering::getPICJumpTableRelocBase(Table, DAG);
+  default: {
+    MachineFunction &MF = DAG.getMachineFunction();
----------------
I think we should be explicit about what cases this covers. JITDefault, Kernel & Large? I didn't think we actually supported a Kernel model on AArch64, but I could sort of believe it wanted this.


================
Comment at: lib/Target/AArch64/AArch64ISelLowering.cpp:2350-2351
+  default: {
+    auto *AArch64FI = MF->getInfo<AArch64FunctionInfo>();
+    return MCSymbolRefExpr::create(AArch64FI->getCurrentFnSymbol(), Ctx);
+  }
----------------
It looks like `getTargetMachine().getSymbol(MF->getFunction())` would be correct (going via getOrCreateSymbol) and save stashing the symbol away in the FunctionInfo.


Repository:
  rL LLVM

https://reviews.llvm.org/D26779





More information about the llvm-commits mailing list