OSDN Git Service

[ShrinkWrap] Take into account landing pad
authorQuentin Colombet <qcolombet@apple.com>
Tue, 20 Mar 2018 02:44:40 +0000 (02:44 +0000)
committerQuentin Colombet <qcolombet@apple.com>
Tue, 20 Mar 2018 02:44:40 +0000 (02:44 +0000)
commitc83d754ae2b43bd61b741f319d7fd343ec1c0a07
treebf5ec68a0a5a569bab1a552a4f490ca981d86845
parent12ea464263766b2241f81792fdc1f13f3f9548e9
[ShrinkWrap] Take into account landing pad

When scanning the function for CSRs uses and defs, also check if
the basic block are landing pads.
Consider that landing pads needs the CSRs to be properly set.
That way we force the prologue/epilogue to always be pushed out
of the problematic "throw" region. The "throw" region is
problematic because the jumps are not properly modeled.

Fixes PR36513

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327942 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/ShrinkWrap.cpp
test/CodeGen/X86/x86-shrink-wrap-unwind.ll