mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-10-19 11:02:59 +02:00
3675555b63
This implements basic instructions for the new spec. - Adds new versions of instructions: `catch`, `catch_all`, and `rethrow` - Adds support for instruction selection for the new instructions - `catch` needs a custom routine for the same reason `throw` needs one, to encode `__cpp_exception` tag symbol. - Updates `WebAssembly::isCatch` utility function to include `catch_all` and Change code that compares an instruction's opcode with `catch` to use that function. - LateEHPrepare - Previously in LateEHPrepare we added `catch` instruction to both `catchpad`s (for user catches) and `cleanuppad`s (for destructors). In the new version `catch` is generated from `llvm.catch` intrinsic in instruction selection phase, so we only need to add `catch_all` to the beginning of cleanup pads. - `catch` is generated from instruction selection, but we need to hoist the `catch` instruction to the beginning of every EH pad, because `catch` can be in the middle of the EH pad or even in a split BB from it after various code transformations. - Removes `addExceptionExtraction` function, which was used to generate `br_on_exn` before. - CFGStackfiy: Deletes `fixUnwindMismatches` function. Running this function on the new instruction causes crashes, and the new version will be added in a later CL, whose contents will be completely different. So deleting the whole function will make the diff easier to read. - Reenables all disabled tests in exception.ll and eh-lsda.ll and a single basic test in cfg-stackify-eh.ll. - Updates existing tests to use the new assembly format. And deletes `br_on_exn` instructions from the tests and FileCheck lines. Reviewed By: dschuff, tlively Differential Revision: https://reviews.llvm.org/D94040
43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
//- WebAssemblyISD.def - WebAssembly ISD ---------------------------*- C++ -*-//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
///
|
|
/// \file
|
|
/// This file describes the various WebAssembly ISD node types.
|
|
///
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
// NOTE: NO INCLUDE GUARD DESIRED!
|
|
|
|
HANDLE_NODETYPE(CALL)
|
|
HANDLE_NODETYPE(RET_CALL)
|
|
HANDLE_NODETYPE(RETURN)
|
|
HANDLE_NODETYPE(ARGUMENT)
|
|
// A wrapper node for TargetExternalSymbol, TargetGlobalAddress, and MCSymbol
|
|
HANDLE_NODETYPE(Wrapper)
|
|
// A special wapper used in PIC code for __memory_base/__table_base relcative
|
|
// access.
|
|
HANDLE_NODETYPE(WrapperPIC)
|
|
HANDLE_NODETYPE(BR_IF)
|
|
HANDLE_NODETYPE(BR_TABLE)
|
|
HANDLE_NODETYPE(SHUFFLE)
|
|
HANDLE_NODETYPE(SWIZZLE)
|
|
HANDLE_NODETYPE(VEC_SHL)
|
|
HANDLE_NODETYPE(VEC_SHR_S)
|
|
HANDLE_NODETYPE(VEC_SHR_U)
|
|
HANDLE_NODETYPE(WIDEN_LOW_S)
|
|
HANDLE_NODETYPE(WIDEN_LOW_U)
|
|
HANDLE_NODETYPE(WIDEN_HIGH_S)
|
|
HANDLE_NODETYPE(WIDEN_HIGH_U)
|
|
HANDLE_NODETYPE(THROW)
|
|
HANDLE_NODETYPE(CATCH)
|
|
HANDLE_NODETYPE(MEMORY_COPY)
|
|
HANDLE_NODETYPE(MEMORY_FILL)
|
|
|
|
// Memory intrinsics
|
|
HANDLE_MEM_NODETYPE(LOAD_SPLAT)
|