diff options
| author | Heejin Ahn <aheejin@gmail.com> | 2018-08-21 19:44:11 +0000 |
|---|---|---|
| committer | Heejin Ahn <aheejin@gmail.com> | 2018-08-21 19:44:11 +0000 |
| commit | ed5e06b0a7174b8da1f9a21e9a182a944a116ceb (patch) | |
| tree | d0a19c755da1a3abaea46c09687e262c1c923ddf /llvm/lib/Target/WebAssembly | |
| parent | 4a76d3e56840b98b66405d6dda53734c0229f1fd (diff) | |
| download | bcm5719-llvm-ed5e06b0a7174b8da1f9a21e9a182a944a116ceb.tar.gz bcm5719-llvm-ed5e06b0a7174b8da1f9a21e9a182a944a116ceb.zip | |
[WebAssembly] Add isEHScopeReturn instruction property
Summary:
So far, `isReturn` property is used to mean both a return instruction
from a functon and the end of an EH scope, a scope that starts with a EH
scope entry BB and ends with a catchret or a cleanupret instruction.
Because WinEH uses funclets, all EH-scope-ending instructions are also
real return instruction from a function. But for wasm, they only serve
as the end marker of an EH scope but not a return instruction that
exits a function. This mismatch caused incorrect prolog and epilog
generation in wasm EH scopes. This patch fixes this.
This patch is in the same vein with rL333045, which splits
`MachineBasicBlock::isEHFuncletEntry` into `isEHFuncletEntry` and
`isEHScopeEntry`.
Reviewers: dschuff
Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D50653
llvm-svn: 340325
Diffstat (limited to 'llvm/lib/Target/WebAssembly')
| -rw-r--r-- | llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td index cd2336393cc..a987906e087 100644 --- a/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td +++ b/llvm/lib/Target/WebAssembly/WebAssemblyInstrControl.td @@ -185,10 +185,8 @@ defm CATCH_ALL : NRI<(outs), (ins), [], "catch_all", 0x05>; } // Pseudo instructions: cleanupret / catchret -// They are not return instructions in wasm, but setting 'isReturn' to true as -// in X86 is necessary for computing EH scope membership. let isTerminator = 1, hasSideEffects = 1, isBarrier = 1, hasCtrlDep = 1, - isCodeGenOnly = 1, isReturn = 1 in { + isCodeGenOnly = 1, isEHScopeReturn = 1 in { defm CLEANUPRET : NRI<(outs), (ins), [(cleanupret)], "", 0>; defm CATCHRET : NRI<(outs), (ins bb_op:$dst, bb_op:$from), [(catchret bb:$dst, bb:$from)], "", 0>; |

