[all-commits] [llvm/llvm-project] 2d89e0: [SEH] Remove CATCHPAD SDNode and X86::EH_RESTORE M...
Reid Kleckner via All-commits
all-commits at lists.llvm.org
Tue Feb 4 15:18:27 PST 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 2d89e0a09880f20c48f19afef6380f2b53cc0b4c
https://github.com/llvm/llvm-project/commit/2d89e0a09880f20c48f19afef6380f2b53cc0b4c
Author: Reid Kleckner <rnk at google.com>
Date: 2020-02-04 (Tue, 04 Feb 2020)
Changed paths:
M llvm/include/llvm/CodeGen/ISDOpcodes.h
M llvm/include/llvm/Target/TargetSelectionDAG.td
M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
M llvm/lib/Target/AArch64/AArch64ISelLowering.h
M llvm/lib/Target/AArch64/AArch64InstrInfo.td
M llvm/lib/Target/X86/X86ExpandPseudo.cpp
M llvm/lib/Target/X86/X86FrameLowering.cpp
M llvm/lib/Target/X86/X86FrameLowering.h
M llvm/lib/Target/X86/X86ISelLowering.cpp
M llvm/lib/Target/X86/X86ISelLowering.h
M llvm/lib/Target/X86/X86InstrCompiler.td
A llvm/test/CodeGen/X86/seh-except-restore.ll
Log Message:
-----------
[SEH] Remove CATCHPAD SDNode and X86::EH_RESTORE MachineInstr
The CATCHPAD node mostly existed to be selected into the EH_RESTORE
instruction, which sets the frame back up when 32-bit Windows exceptions
return to the parent function. However, creating this MachineInstr early
increases the risk that other passes will come along and insert
instructions that use the stack before ESP and EBP are restored. That
happened in PR44697.
Instead of representing these in the instruction stream early, delay it
until PEI. Mark the blocks where this needs to happen as EHPads, but not
funclet entry blocks. Passes after PEI have to be careful not to hoist
instructions that can use stack across frame setup instructions, so this
should be relatively reliable.
Fixes PR44697
Reviewed By: hans
Differential Revision: https://reviews.llvm.org/D73752
More information about the All-commits
mailing list