2015-06-30 07:51:55 +08:00
|
|
|
set(LLVM_TARGET_DEFINITIONS WebAssembly.td)
|
|
|
|
|
2018-04-04 20:37:44 +08:00
|
|
|
tablegen(LLVM WebAssemblyGenAsmMatcher.inc -gen-asm-matcher)
|
2015-07-23 05:28:15 +08:00
|
|
|
tablegen(LLVM WebAssemblyGenAsmWriter.inc -gen-asm-writer)
|
|
|
|
tablegen(LLVM WebAssemblyGenDAGISel.inc -gen-dag-isel)
|
2018-05-11 06:16:44 +08:00
|
|
|
tablegen(LLVM WebAssemblyGenDisassemblerTables.inc -gen-disassembler)
|
2015-08-25 02:44:37 +08:00
|
|
|
tablegen(LLVM WebAssemblyGenFastISel.inc -gen-fast-isel)
|
2015-07-23 05:28:15 +08:00
|
|
|
tablegen(LLVM WebAssemblyGenInstrInfo.inc -gen-instr-info)
|
2015-06-30 07:51:55 +08:00
|
|
|
tablegen(LLVM WebAssemblyGenMCCodeEmitter.inc -gen-emitter)
|
2015-07-11 02:23:10 +08:00
|
|
|
tablegen(LLVM WebAssemblyGenRegisterInfo.inc -gen-register-info)
|
2015-06-30 07:51:55 +08:00
|
|
|
tablegen(LLVM WebAssemblyGenSubtargetInfo.inc -gen-subtarget)
|
2018-04-04 20:37:44 +08:00
|
|
|
|
2015-06-30 07:51:55 +08:00
|
|
|
add_public_tablegen_target(WebAssemblyCommonTableGen)
|
|
|
|
|
|
|
|
add_llvm_target(WebAssemblyCodeGen
|
2015-12-10 00:23:59 +08:00
|
|
|
WebAssemblyArgumentMove.cpp
|
2015-07-23 05:28:15 +08:00
|
|
|
WebAssemblyAsmPrinter.cpp
|
2016-10-22 00:38:07 +08:00
|
|
|
WebAssemblyCallIndirectFixup.cpp
|
2015-09-17 00:51:30 +08:00
|
|
|
WebAssemblyCFGStackify.cpp
|
2017-02-28 06:38:58 +08:00
|
|
|
WebAssemblyCFGSort.cpp
|
[WebAssembly] Support instruction selection for catching exceptions
Summary:
This lowers exception catching-related instructions:
1. Lowers `wasm.catch` intrinsic to `catch` instruction
2. Removes `catchpad` and `cleanuppad` instructions; they are not
necessary after isel phase. (`MachineBasicBlock::isEHFuncletEntry()` or
`MachineBasicBlock::isEHPad()` can be used instead.)
3. Lowers `catchret` and `cleanupret` instructions to pseudo `catchret`
and `cleanupret` instructions in isel, which will be replaced with other
instructions in `WebAssemblyExceptionPrepare` pass.
4. Adds 'WebAssemblyExceptionPrepare` pass, which is for running various
transformation for EH. Currently this pass only replaces `catchret` and
`cleanupret` instructions into appropriate wasm instructions to make
this patch successfully run until the end.
Currently this does not handle lowering of intrinsics related to LSDA
info generation (`wasm.landingpad.index` and `wasm.lsda`), because they
cannot be tested without implementing `EHStreamer`'s wasm-specific
handlers. They are marked as TODO, which is needed to make isel pass.
Also this does not generate `try` and `end_try` markers yet, which will
be handled in later patches.
This patch is based on the first wasm EH proposal.
(https://github.com/WebAssembly/exception-handling/blob/master/proposals/Exceptions.md)
Reviewers: dschuff, majnemer
Subscribers: jfb, sbc100, jgravelle-google, sunfish, llvm-commits
Differential Revision: https://reviews.llvm.org/D44090
llvm-svn: 333705
2018-06-01 06:25:54 +08:00
|
|
|
WebAssemblyExceptionPrepare.cpp
|
2016-10-25 03:49:43 +08:00
|
|
|
WebAssemblyExplicitLocals.cpp
|
2015-08-25 02:44:37 +08:00
|
|
|
WebAssemblyFastISel.cpp
|
2016-03-09 10:01:14 +08:00
|
|
|
WebAssemblyFixIrreducibleControlFlow.cpp
|
2017-01-07 08:34:54 +08:00
|
|
|
WebAssemblyFixFunctionBitcasts.cpp
|
2015-06-30 07:51:55 +08:00
|
|
|
WebAssemblyFrameLowering.cpp
|
|
|
|
WebAssemblyISelDAGToDAG.cpp
|
|
|
|
WebAssemblyISelLowering.cpp
|
2015-07-23 05:28:15 +08:00
|
|
|
WebAssemblyInstrInfo.cpp
|
2015-12-05 11:03:35 +08:00
|
|
|
WebAssemblyLowerBrUnless.cpp
|
2016-08-18 23:27:25 +08:00
|
|
|
WebAssemblyLowerEmscriptenEHSjLj.cpp
|
2017-12-15 08:17:10 +08:00
|
|
|
WebAssemblyLowerGlobalDtors.cpp
|
2015-06-30 07:51:55 +08:00
|
|
|
WebAssemblyMachineFunctionInfo.cpp
|
2015-11-06 03:28:16 +08:00
|
|
|
WebAssemblyMCInstLower.cpp
|
2016-05-10 12:24:02 +08:00
|
|
|
WebAssemblyOptimizeLiveIntervals.cpp
|
2015-11-26 00:55:01 +08:00
|
|
|
WebAssemblyOptimizeReturned.cpp
|
|
|
|
WebAssemblyPeephole.cpp
|
2016-05-10 12:24:02 +08:00
|
|
|
WebAssemblyPrepareForLiveIntervals.cpp
|
2015-06-30 07:51:55 +08:00
|
|
|
WebAssemblyRegisterInfo.cpp
|
2015-11-17 00:18:28 +08:00
|
|
|
WebAssemblyRegColoring.cpp
|
2015-11-13 01:04:33 +08:00
|
|
|
WebAssemblyRegNumbering.cpp
|
2015-11-17 00:18:28 +08:00
|
|
|
WebAssemblyRegStackify.cpp
|
2016-05-10 12:24:02 +08:00
|
|
|
WebAssemblyReplacePhysRegs.cpp
|
2017-02-23 02:34:16 +08:00
|
|
|
WebAssemblyRuntimeLibcallSignatures.cpp
|
2015-06-30 07:51:55 +08:00
|
|
|
WebAssemblySelectionDAGInfo.cpp
|
2016-01-26 11:39:31 +08:00
|
|
|
WebAssemblySetP2AlignOperands.cpp
|
2015-11-26 00:55:01 +08:00
|
|
|
WebAssemblyStoreResults.cpp
|
2015-06-30 07:51:55 +08:00
|
|
|
WebAssemblySubtarget.cpp
|
|
|
|
WebAssemblyTargetMachine.cpp
|
2015-12-17 12:55:44 +08:00
|
|
|
WebAssemblyTargetObjectFile.cpp
|
2015-06-30 07:51:55 +08:00
|
|
|
WebAssemblyTargetTransformInfo.cpp
|
2016-10-25 03:49:43 +08:00
|
|
|
WebAssemblyUtilities.cpp
|
2015-06-30 07:51:55 +08:00
|
|
|
|
2016-11-17 12:36:50 +08:00
|
|
|
DEPENDS
|
|
|
|
intrinsics_gen
|
|
|
|
)
|
2015-06-30 07:51:55 +08:00
|
|
|
|
2018-03-21 04:06:35 +08:00
|
|
|
add_subdirectory(AsmParser)
|
2016-01-12 11:32:29 +08:00
|
|
|
add_subdirectory(Disassembler)
|
2015-06-30 07:51:55 +08:00
|
|
|
add_subdirectory(InstPrinter)
|
|
|
|
add_subdirectory(MCTargetDesc)
|
2016-01-08 09:06:00 +08:00
|
|
|
add_subdirectory(TargetInfo)
|