Re-land "Avoid emitting unreachable SP adjustments after `throw`"
authorReid Kleckner <rnk@google.com>
Tue, 24 Mar 2020 18:49:44 +0000 (11:49 -0700)
committerReid Kleckner <rnk@google.com>
Tue, 24 Mar 2020 19:04:43 +0000 (12:04 -0700)
commit597718aae017a870e99cdb37b3bc10d8dfa58a25
tree2855b82ffb8cd06100ee842cd86a1d7a2de9ace4
parent8f64b02d336a2197ce948026f5b2008b68d73a58
Re-land "Avoid emitting unreachable SP adjustments after `throw`"

This reverts commit 4e0fe038f438ae1679eae9e156e1f248595b2373. Re-lands
65b21282c710afe9c275778820c6e3c1cf46734b.

After landing 5ff5ddd0adc89f8827b345577bbb3e7eb74fc644 to add int3 into
trailing unreachable blocks, we can now remove these extra stack
adjustments without confusing the Win64 unwinder. See
https://llvm.org/45064#c4 or X86AvoidTrailingCall.cpp for a full
explanation.

Fixes PR45064.
llvm/lib/Target/X86/X86FrameLowering.cpp
llvm/lib/Target/X86/X86ISelLowering.cpp
llvm/test/CodeGen/X86/noreturn-call-win64.ll