[PATCH] D57183: [COFF, ARM64] Fix localaddress to handle stack realignment and variable size objects

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 31 18:15:14 PST 2019


rnk accepted this revision.
rnk added a comment.

I see, we need a separate register selection codepath that ignores frame size considerations. (I could be wrong, I haven't dug that deep, though.)

I think the functionality is good, but I keep insisting that we name these routines after the localescape / localrecover intrinsic set, since they are ostensibly for lambdas as well as SEH. :) Feel free to use your judgement, don't want for me to review it.



================
Comment at: include/llvm/CodeGen/TargetFrameLowering.h:267
+  /// based on which base register is returned by llvm.localaddress.
+  virtual int getEHFrameIndexReference(const MachineFunction &MF,
+                                       int FI) const {
----------------
Let's call this `getNonLocalFrameIndexReference`. In theory, this should have nothing to do with EH. llvm.localescape is a separate LLVM IR feature that happens to support the frontend-outlined __try / __except / __finally funclets.


================
Comment at: lib/Target/AArch64/AArch64RegisterInfo.h:125
+
+  unsigned getSEHFrameRegister(const MachineFunction &MF) const;
 };
----------------
Similarly, perhaps this should be `getLocalAddressRegister` so it's associated with the intrinsics.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57183/new/

https://reviews.llvm.org/D57183





More information about the llvm-commits mailing list