1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00
llvm-mirror/lib
Heejin Ahn aaf0cbd6bc [WebAssembly] Make rethrow take an except_ref type argument
Summary:
In the new wasm EH proposal, `rethrow` takes an `except_ref` argument.
This change was missing in r352598.

This patch adds `llvm.wasm.rethrow.in.catch` intrinsic. This is an
intrinsic that's gonna eventually be lowered to wasm `rethrow`
instruction, but this intrinsic can appear only within a catchpad or a
cleanuppad scope. Also this intrinsic needs to be invokable - otherwise
EH pad successor for it will not be correctly generated in clang.

This also adds lowering logic for this intrinsic in
`SelectionDAGBuilder::visitInvoke`. This routine is basically a
specialized and simplified version of
`SelectionDAGBuilder::visitTargetIntrinsic`, but we can't use it
because if is only for `CallInst`s.

This deletes the previous `llvm.wasm.rethrow` intrinsic and related
tests, which was meant to be used within a `__cxa_rethrow` library
function. Turned out this needs some more logic, so the intrinsic for
this purpose will be added later.

LateEHPrepare takes a result value of `catch` and inserts it into
matching `rethrow` as an argument.

`RETHROW_IN_CATCH` is a pseudo instruction that serves as a link between
`llvm.wasm.rethrow.in.catch` and the real wasm `rethrow` instruction. To
generate a `rethrow` instruction, we need an `except_ref` argument,
which is generated from `catch` instruction. But `catch` instrutions are
added in LateEHPrepare pass, so we use `RETHROW_IN_CATCH`, which takes
no argument, until we are able to correctly lower it to `rethrow` in
LateEHPrepare.

Reviewers: dschuff

Subscribers: sbc100, jgravelle-google, sunfish, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59352

llvm-svn: 356316
2019-03-16 05:38:57 +00:00
..
Analysis [ValueTracking] Use ConstantRange overflow checks for unsigned add/sub; NFC 2019-03-15 18:37:45 +00:00
AsmParser [ThinLTO] Restructure AliasSummary to contain ValueInfo of Aliasee 2019-03-15 15:11:38 +00:00
BinaryFormat [MsgPack] Removed MsgPackTypes 2019-03-13 18:56:33 +00:00
Bitcode [ThinLTO] Restructure AliasSummary to contain ValueInfo of Aliasee 2019-03-15 15:11:38 +00:00
CodeGen [WebAssembly] Make rethrow take an except_ref type argument 2019-03-16 05:38:57 +00:00
DebugInfo [llvm] Skip over empty line table entries. 2019-03-15 15:00:12 +00:00
Demangle
ExecutionEngine Add newline to interpreter debugging output 2019-03-07 10:14:38 +00:00
Fuzzer
FuzzMutate
IR [WebAssembly] Make rethrow take an except_ref type argument 2019-03-16 05:38:57 +00:00
IRReader
LineEditor
Linker
LTO Reland "[Remarks] Add -foptimization-record-passes to filter remark emission" 2019-03-12 21:22:27 +00:00
MC [MC] Sort FDEs by the associated CIE before emitting them. 2019-03-14 23:08:19 +00:00
MCA [MCA] Highlight kernel bottlenecks in the summary view. 2019-03-04 11:52:34 +00:00
Object [WebAssembly] Improve support for "needed" list in dylink section 2019-03-13 21:29:20 +00:00
ObjectYAML [yaml2obj]Allow explicit setting of p_filesz, p_memsz, and p_offset 2019-03-15 10:35:27 +00:00
Option
Passes [PGO] Context sensitive PGO (part 3) 2019-03-04 20:21:27 +00:00
ProfileData [SampleFDO] add suffix elision control for fcn names 2019-03-14 13:56:49 +00:00
Remarks [Remarks][NFC] Rename RemarkParser to YAMLRemarkParser 2019-03-05 20:50:35 +00:00
Support Handle consecutive-double-quotes in Windows argument parsing 2019-03-14 19:26:04 +00:00
TableGen [TableGen] Allow 2^63-1 and 2^63-2 as int literals. 2019-03-12 09:28:19 +00:00
Target [WebAssembly] Make rethrow take an except_ref type argument 2019-03-16 05:38:57 +00:00
Testing
TextAPI
ToolDrivers
Transforms [SimplifyDemandedVec] Strengthen handling all undef lanes (particularly GEPs) 2019-03-15 19:54:06 +00:00
WindowsManifest
XRay
CMakeLists.txt [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00
LLVMBuild.txt [OptRemarks] Make OptRemarks more generic: rename OptRemarks to Remarks 2019-03-05 20:45:17 +00:00