This is an archive of the discontinued LLVM Phabricator instance.

[AArch64] Exclude instructions after setting the FP from SEH prologues
ClosedPublic

Authored by mstorsjo on Oct 11 2022, 9:01 AM.

Details

Summary

After setting up the FP, the rest of the prologue doesn't need to
be replayed for unwinding the stack frame.

This allows reverting the functional parts of
2f7fbf837625267193351cc334e506a3a9161958.

Diff Detail

Event Timeline

mstorsjo created this revision.Oct 11 2022, 9:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 9:01 AM
mstorsjo requested review of this revision.Oct 11 2022, 9:01 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 11 2022, 9:01 AM
efriedma added inline comments.Oct 11 2022, 9:59 AM
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
4350

I don't think you need to revert the part of the change involving the redundant *HasWinCFI = true;?

mstorsjo added inline comments.Oct 11 2022, 10:12 AM
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
4350

Oh, right. I noted that after removing the else case, there’s one possible codepath where no SEH opcodes are added, and we perhaps shouldn’t be setting HasWinCFI, but apparently we had that inconsistency before this change. So either we should remove the catch-all setting of it below to remove the inconsistency, or just leave that part as it is.

efriedma added inline comments.Oct 11 2022, 10:14 AM
llvm/lib/Target/AArch64/AArch64InstrInfo.cpp
4350

Whatever you think makes sense.

mstorsjo updated this revision to Diff 466879.Oct 11 2022, 11:58 AM

Removed the duplicate setting of HasWinCFI.

This revision is now accepted and ready to land.Oct 11 2022, 1:23 PM