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

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 22 07:47:28 PST 2016


t.p.northover added inline comments.


================
Comment at: lib/Target/AArch64/AArch64ISelLowering.cpp:2350-2351
+  default: {
+    auto *AArch64FI = MF->getInfo<AArch64FunctionInfo>();
+    return MCSymbolRefExpr::create(AArch64FI->getCurrentFnSymbol(), Ctx);
+  }
----------------
joerg wrote:
> 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.
I still think the locality makes it simpler.

Actually, I think it makes little sense for `getSymbol` to require a mangler. The implementation already goes most of the way towards getting one of its own (it has a TLOF local variable). I think I'll fix that this morning.


Repository:
  rL LLVM

https://reviews.llvm.org/D26779





More information about the llvm-commits mailing list