This revision was automatically updated to reflect the committed changes.
Closed by commit rL333703: [WebAssembly] Use Windows EH instructions for Wasm
EH (authored by aheejin, committed by ).
Herald added a subscriber: llvm-commits.
Repository:
rL LLVM
https://reviews.llvm.org/D44931
Files:
aheejin added a comment.
Oh no, sorry, it actually depends on https://reviews.llvm.org/D43746; but not
others on the chain. I changed the signatures of `wasm.get.exception` and
`wasm.get.ehselector` intrinsics to take a token argument, and the intrinsic
signature change is added in https://revi
aheejin added a comment.
Thanks! No, it does not depend on the other CL chain on the llvm side.
Repository:
rC Clang
https://reviews.llvm.org/D44931
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/lis
dschuff accepted this revision.
dschuff added a comment.
This revision is now accepted and ready to land.
LGTM assuming we are convinced for now that finding the rethrow block from the
CatchSwitch will work. Does this need to wait until after
https://reviews.llvm.org/D43746 or other CLs from tha
aheejin added inline comments.
Comment at: lib/CodeGen/CGException.cpp:1241-1245
+while (llvm::TerminatorInst *TI = RethrowBlock->getTerminator()) {
+ llvm::BranchInst *BI = cast(TI);
+ assert(BI->isConditional());
+ RethrowBlock = BI->getSuccessor(1);
+}
-
majnemer added inline comments.
Comment at: lib/CodeGen/CGException.cpp:1173
+cast(CatchStartBlock->getFirstNonPHI());
+CurrentFuncletPad = CPI;
+ }
aheejin wrote:
> majnemer wrote:
> > Hmm, why is this done? Won't RestoreCurrentFuncletPad undo this?
aheejin updated this revision to Diff 147696.
aheejin added a comment.
Test case fix was missing in the last commit
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
lib/CodeGen/CGException.cpp
lib/C
aheejin updated this revision to Diff 147695.
aheejin added a comment.
- Make `wasm.get.exception/selector` intrinsics take a token argument
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
lib/CodeGe
aheejin added inline comments.
Comment at: lib/CodeGen/CGException.cpp:1241-1245
+while (llvm::TerminatorInst *TI = RethrowBlock->getTerminator()) {
+ llvm::BranchInst *BI = cast(TI);
+ assert(BI->isConditional());
+ RethrowBlock = BI->getSuccessor(1);
+}
-
aheejin added a comment.
Thank you for the reviews!
Comment at: lib/CodeGen/CGException.cpp:1173
+cast(CatchStartBlock->getFirstNonPHI());
+CurrentFuncletPad = CPI;
+ }
majnemer wrote:
> Hmm, why is this done? Won't RestoreCurrentFuncletPad undo th
aheejin updated this revision to Diff 147287.
aheejin marked an inline comment as done.
aheejin added a comment.
`CatchStartBlock` -> `WasmCatchStartBlock`
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup
majnemer added inline comments.
Comment at: lib/CodeGen/CGException.cpp:1164
+ CurrentFuncletPad);
+ llvm::BasicBlock *CatchStartBlock = nullptr;
+ if (EHPersonality::get(*this).isWasmPersonality()) {
Maybe this should be called WasmCatchStartBlock?
aheejin updated this revision to Diff 146076.
aheejin added a comment.
- getMSVCDispatchBlock -> getFuncletEHDispatchBlock
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
lib/CodeGen/CGException.cpp
aheejin updated this revision to Diff 141983.
aheejin added a comment.
- Rebase
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
lib/CodeGen/CGException.cpp
lib/CodeGen/ItaniumCXXABI.cpp
lib/CodeG
aheejin updated this revision to Diff 141979.
aheejin added a comment.
- Change personality function name to a unique one
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
lib/CodeGen/CGException.cpp
aheejin updated this revision to Diff 141759.
aheejin added a comment.
- Add a test in which try-catches are nested within a catch
- Rebase
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
lib/CodeGen
dschuff added inline comments.
Comment at: lib/CodeGen/CGException.cpp:1541
+ }
llvm::CallInst *terminateCall =
+ CGM.getCXXABI().emitTerminateForUnexpectedException(*this, Exn);
aheejin wrote:
> dschuff wrote:
> > Should this be in an else block? No nee
aheejin updated this revision to Diff 140156.
aheejin marked an inline comment as done.
aheejin added a comment.
- GNU_CPlusCPlus -> GNU_CPlusPlus
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
lib/
aheejin added inline comments.
Comment at: lib/CodeGen/CGException.cpp:1541
+ }
llvm::CallInst *terminateCall =
+ CGM.getCXXABI().emitTerminateForUnexpectedException(*this, Exn);
dschuff wrote:
> Should this be in an else block? No need to emit it after
dschuff added a comment.
Otherwise it looks good to me, although @majnemer would know more about the
subtleties of what IR actually gets generated.
Comment at: lib/CodeGen/CGCleanup.h:630
static const EHPersonality MSVC_CxxFrameHandler3;
+ static const EHPersonality GNU_Wa
aheejin updated this revision to Diff 140144.
aheejin marked an inline comment as done.
aheejin added a comment.
- Rebase & Simplified the if condition
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
aheejin added inline comments.
Comment at: lib/CodeGen/CGCXXABI.h:610
+struct CatchRetScope final : EHScopeStack::Cleanup {
+ llvm::CatchPadInst *CPI;
dschuff wrote:
> Should be `public`?
This code was moved from [[
https://github.com/llvm-mirror/clang/blob/c
dschuff added inline comments.
Comment at: lib/CodeGen/CGCXXABI.h:610
+struct CatchRetScope final : EHScopeStack::Cleanup {
+ llvm::CatchPadInst *CPI;
Should be `public`?
Comment at: lib/CodeGen/CGCleanup.h:630
static const EHPersonality
majnemer added a comment.
Some quick first pass comments.
Comment at: lib/CodeGen/CGCleanup.cpp:985
+// does not have a runtime support for that.
+if (!Personality.usesFuncletPads() || Personality.isWasmPersonality()) {
+ EHStack.pushTerminate();
I
aheejin updated this revision to Diff 139920.
aheejin added a comment.
- Comment fix
Repository:
rC Clang
https://reviews.llvm.org/D44931
Files:
lib/CodeGen/CGCXXABI.h
lib/CodeGen/CGCleanup.cpp
lib/CodeGen/CGCleanup.h
lib/CodeGen/CGException.cpp
lib/CodeGen/ItaniumCXXABI.cpp
lib/
aheejin created this revision.
aheejin added reviewers: majnemer, dschuff.
Herald added subscribers: cfe-commits, sunfish, jgravelle-google, sbc100, jfb.
Because wasm control flow needs to be structured, using WinEH
instructions to support wasm EH brings several benefits. This patch
makes wasm EH
26 matches
Mail list logo