1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 11:42:57 +01:00
llvm-mirror/lib/IR
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
..
AbstractCallSite.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
AsmWriter.cpp Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
AttributeImpl.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Attributes.cpp IR: Add immarg attribute 2019-03-12 21:02:54 +00:00
AttributesCompatFunc.td
AutoUpgrade.cpp [Bitcode] Fix bitcode compatibility issue with clang.arc.use intrinsic 2019-03-08 05:27:53 +00:00
BasicBlock.cpp Revert "[INLINER] allow inlining of address taken blocks" 2019-02-14 23:42:21 +00:00
CMakeLists.txt Reland "[Remarks] Refactor remark diagnostic emission in a RemarkStreamer" 2019-03-06 15:20:13 +00:00
Comdat.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConstantFold.cpp [IR][ARM] Add function pointer alignment to datalayout 2019-03-08 10:44:06 +00:00
ConstantFold.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
ConstantRange.cpp [ConstantRange] Add overflow check helpers 2019-03-15 17:29:05 +00:00
Constants.cpp [InstCombine] canonicalize funnel shift constant shift amount to be modulo bitwidth 2019-03-14 19:22:08 +00:00
ConstantsContext.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Core.cpp [LLVM-C] Add Bindings to GlobalIFunc 2019-02-05 18:05:44 +00:00
DataLayout.cpp [IR][ARM] Add function pointer alignment to datalayout 2019-03-08 10:44:06 +00:00
DebugInfo.cpp [LLVM-C] Add bindings to create enumerators 2019-02-17 21:25:47 +00:00
DebugInfoMetadata.cpp [DEBUG_INFO][NVPTX] Generate DW_AT_address_class to get the values in debugger. 2019-02-05 19:33:47 +00:00
DebugLoc.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DiagnosticHandler.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DiagnosticInfo.cpp Revert "[Remarks] Refactor remark diagnostic emission in a RemarkStreamer" 2019-03-06 14:52:37 +00:00
DiagnosticPrinter.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
DIBuilder.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Dominators.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Function.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00
Globals.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
GVMaterializer.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
InlineAsm.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Instruction.cpp Implementation of asm-goto support in LLVM 2019-02-08 20:48:56 +00:00
Instructions.cpp Remove large amount of empty lines mid-file. NFC 2019-03-03 13:21:38 +00:00
IntrinsicInst.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
IRBuilder.cpp [opaque pointer types] Pass function types to InvokeInst creation. 2019-02-01 20:43:34 +00:00
IRPrintingPasses.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LegacyPassManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMContext.cpp Reland "[Remarks] Refactor remark diagnostic emission in a RemarkStreamer" 2019-03-06 15:20:13 +00:00
LLVMContextImpl.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
LLVMContextImpl.h Reland "[Remarks] Refactor remark diagnostic emission in a RemarkStreamer" 2019-03-06 15:20:13 +00:00
Mangler.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MDBuilder.cpp [NFC] Fix unused variable warnings in Release builds 2019-01-19 09:39:57 +00:00
Metadata.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MetadataImpl.h Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Module.cpp [PGO] Context sensitive PGO (part 2) 2019-02-28 19:55:07 +00:00
ModuleSummaryIndex.cpp [ThinLTO] Restructure AliasSummary to contain ValueInfo of Aliasee 2019-03-15 15:11:38 +00:00
Operator.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
OptBisect.cpp Fix IR/Analysis layering issue with OptBisect 2019-02-28 04:00:55 +00:00
Pass.cpp Fix IR/Analysis layering issue with OptBisect 2019-02-28 04:00:55 +00:00
PassInstrumentation.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassManager.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassRegistry.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
PassTimingInfo.cpp [TimePasses] allow -time-passes reporting into a custom stream 2019-03-15 22:15:23 +00:00
ProfileSummary.cpp [PGO] Context sensitive PGO (part 2) 2019-02-28 19:55:07 +00:00
RemarkStreamer.cpp Reland "[Remarks] Add -foptimization-record-passes to filter remark emission" 2019-03-12 21:22:27 +00:00
SafepointIRVerifier.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Statepoint.cpp [CallSite removal] Migrate the statepoint GC infrastructure to use the 2019-02-11 07:42:30 +00:00
SymbolTableListTraitsImpl.h [ADT] Notify ilist traits about in-list transfers 2019-01-23 22:59:52 +00:00
Type.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
TypeFinder.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Use.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
User.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Value.cpp [IR][ARM] Add function pointer alignment to datalayout 2019-03-08 10:44:06 +00:00
ValueSymbolTable.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
Verifier.cpp [WebAssembly] Make rethrow take an except_ref type argument 2019-03-16 05:38:57 +00:00