[PATCH] D51524: [ARM64] [Windows] Handle funclets
Francis Visoiu Mistrih via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 6 08:40:44 PST 2018
thegameg added a comment.
I am afraid I don't know much about exceptions on Windows in general. A few comments below.
================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:1497
+ } else if (MF.hasEHFunclets() && !RegInfo->hasBasePointer(MF)) {
+ // Funclets access the locals contained in the in the parent's stack
+ // frame via the frame pointer, so we have to use the FP in the parent
----------------
Small typo: `in the in` -> `in the`
================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:2059
+ // emitPrologue if unwinding info is needed.
+ MF.setHasWinCFI(false);
+
----------------
Why is this needed?
================
Comment at: lib/Target/AArch64/AArch64FrameLowering.cpp:2114
+/// Funclets only need to account for space for the callee saved registers,
+/// as the locals are account for in the paren't stack frame.
+unsigned AArch64FrameLowering::getWinEHFuncletFrameSize(
----------------
typo `paren't` -> `parent's`
================
Comment at: lib/Target/AArch64/AArch64RegisterInfo.cpp:260
+ // a base pointer if the stack is realigned.
+ if (MF.hasEHFunclets() && needsStackRealignment(MF))
+ return true;
----------------
Isn't this already caught by the next nested `if`s?
================
Comment at: test/CodeGen/AArch64/wineh-try-catch-realign.ll:10
+; it shouldn't access the parent's frame via sp, and the prologue and
+; epilogue should be symmetrical.
+; CHECK-LABEL: "?catch$2@?0??a@@YAXXZ at 4HA":
----------------
Is there a chance that we can test the PEI/FrameLowering part with more specific MIR tests? Especially the checks for what the base register should be. The fact that we don't serialize `AArch64FunctionInfo` may make this impossible for now.
Repository:
rL LLVM
https://reviews.llvm.org/D51524
More information about the llvm-commits
mailing list