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

Joerg Sonnenberger via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 18 12:52:12 PST 2016


joerg added inline comments.


================
Comment at: lib/Target/AArch64/AArch64ISelLowering.cpp:2322
+    return TargetLowering::getPICJumpTableRelocBase(Table, DAG);
+  default: {
+    MachineFunction &MF = DAG.getMachineFunction();
----------------
t.p.northover wrote:
> 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.
I'm not attached to using default here, enumerating all code models works fine for me, too. The primary concern for me is that we are pessimistic in our assumptions, e.g. whether the 2GB difference works or not.


================
Comment at: lib/Target/AArch64/AArch64ISelLowering.cpp:2350-2351
+  default: {
+    auto *AArch64FI = MF->getInfo<AArch64FunctionInfo>();
+    return MCSymbolRefExpr::create(AArch64FI->getCurrentFnSymbol(), Ctx);
+  }
----------------
t.p.northover wrote:
> It looks like `getTargetMachine().getSymbol(MF->getFunction())` would be correct (going via getOrCreateSymbol) and save stashing the symbol away in the FunctionInfo.
TM::getSymbol needs access to the mangler. The implementation in AsmPrinter uses getObjFileLowering() for accessing that. It doesn't seem to be simpler that way.

I'm consider whether the symbol should be stashed into the generic MachineFunction data, but that looks like an optimisation for a separate patch.


Repository:
  rL LLVM

https://reviews.llvm.org/D26779





More information about the llvm-commits mailing list