r340235 - [WebAssembly] Revert type of wake count in atomic.wake to i32

2018-08-20 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Mon Aug 20 16:49:34 2018 New Revision: 340235 URL: http://llvm.org/viewvc/llvm-project?rev=340235&view=rev Log: [WebAssembly] Revert type of wake count in atomic.wake to i32 Summary: We decided to revert this from i64 to i32 in Nov 28 CG meeting. Fixes PR38632. Reviewers: d

[clang-tools-extra] r332438 - [clangd] Fix a link failure in unittests

2018-05-16 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Wed May 16 01:53:57 2018 New Revision: 332438 URL: http://llvm.org/viewvc/llvm-project?rev=332438&view=rev Log: [clangd] Fix a link failure in unittests Summary: D46524 (rL332378) introduced a link failure when built with `-DSHARED_LIB=ON`, which this patch fixes. Reviewers

r341254 - [WebAssembly] clang-format (NFC)

2018-08-31 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Fri Aug 31 13:57:00 2018 New Revision: 341254 URL: http://llvm.org/viewvc/llvm-project?rev=341254&view=rev Log: [WebAssembly] clang-format (NFC) Summary: This patch runs clang-format on all wasm-only files. Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, cfe-c

[clang-tools-extra] r342037 - [clangd] Add missing clangBasic target_link_libraries

2018-09-12 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Wed Sep 12 02:40:13 2018 New Revision: 342037 URL: http://llvm.org/viewvc/llvm-project?rev=342037&view=rev Log: [clangd] Add missing clangBasic target_link_libraries Without this, builds with `-DSHARED_LIB=ON` fail. Modified: clang-tools-extra/trunk/clangd/index/dex/dex

[libcxx] r337727 - [CMake] Fix the setting of LIBCXX_HEADER_DIR

2018-07-23 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Mon Jul 23 11:58:12 2018 New Revision: 337727 URL: http://llvm.org/viewvc/llvm-project?rev=337727&view=rev Log: [CMake] Fix the setting of LIBCXX_HEADER_DIR Reviewers: phosek Subscribers: mgorny, christof, ldionne, cfe-commits Differential Revision: https://reviews.llvm.or

Re: [libcxx] r337727 - [CMake] Fix the setting of LIBCXX_HEADER_DIR

2018-07-23 Thread Heejin Ahn via cfe-commits
org:8080/green/job/clang-stage1-cmake-RA-expensive/12202/consoleFull >> /Users/buildslave/jenkins/workspace/clang-stage1-cmake-RA-expensive/llvm/projects/compiler-rt/lib/fuzzer/FuzzerDefs.h:15:10: >> fatal error: 'cassert' file not found >> #include >> ^~~~~~~~~

r338771 - [WebAssembly] Support for atomic.wait / atomic.wake builtins

2018-08-02 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Thu Aug 2 14:44:40 2018 New Revision: 338771 URL: http://llvm.org/viewvc/llvm-project?rev=338771&view=rev Log: [WebAssembly] Support for atomic.wait / atomic.wake builtins Summary: Add support for atomic.wait / atomic.wake builtins based on the Wasm thread proposal. Review

[clang-tools-extra] r325458 - [clangd] Fix link failures for Preprocessor::addCommentHandler

2018-02-18 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Sun Feb 18 02:50:16 2018 New Revision: 325458 URL: http://llvm.org/viewvc/llvm-project?rev=325458&view=rev Log: [clangd] Fix link failures for Preprocessor::addCommentHandler Summary: D42640 adds calls to `Preprocessor::addCommentHandler` in `unittests/clangd/SymbolCollector

r326517 - [WebAssembly] Add exception handling option

2018-03-01 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Thu Mar 1 16:39:16 2018 New Revision: 326517 URL: http://llvm.org/viewvc/llvm-project?rev=326517&view=rev Log: [WebAssembly] Add exception handling option Summary: Add exception handling option to clang. Reviewers: dschuff Subscribers: jfb, sbc100, jgravelle-google, sunfi

r333703 - [WebAssembly] Use Windows EH instructions for Wasm EH

2018-05-31 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Thu May 31 15:18:13 2018 New Revision: 333703 URL: http://llvm.org/viewvc/llvm-project?rev=333703&view=rev Log: [WebAssembly] Use Windows EH instructions for Wasm EH Summary: Because wasm control flow needs to be structured, using WinEH instructions to support wasm EH brings

r333716 - [WebAssembly] Hide new Wasm EH behind its feature flag

2018-05-31 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Thu May 31 18:01:37 2018 New Revision: 333716 URL: http://llvm.org/viewvc/llvm-project?rev=333716&view=rev Log: [WebAssembly] Hide new Wasm EH behind its feature flag Summary: clang's current wasm EH implementation is a non-MVP feature in progress. We had a `-mexception-hand

r333938 - Remove llvm::Triple argument from get***Personality() functions. NFC.

2018-06-04 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Mon Jun 4 11:23:00 2018 New Revision: 333938 URL: http://llvm.org/viewvc/llvm-project?rev=333938&view=rev Log: Remove llvm::Triple argument from get***Personality() functions. NFC. Summary: Because `llvm::Triple` can be derived from `TargetInfo`, it is simpler to take only

[clang-tools-extra] r345191 - [clant-tidy] abseil: Add clangTooling to CMakeLists.txt

2018-10-24 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Wed Oct 24 13:31:58 2018 New Revision: 345191 URL: http://llvm.org/viewvc/llvm-project?rev=345191&view=rev Log: [clant-tidy] abseil: Add clangTooling to CMakeLists.txt Without this, builds with `-DBUILD_SHARED_LIBS=ON` fail. Modified: clang-tools-extra/trunk/clang-tidy/

r347005 - [WebAssembly] Change type of wake count to unsigned int

2018-11-15 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Thu Nov 15 16:48:58 2018 New Revision: 347005 URL: http://llvm.org/viewvc/llvm-project?rev=347005&view=rev Log: [WebAssembly] Change type of wake count to unsigned int Summary: We discussed this at the Nov 12th CG meeting, and decided to use the unsigned semantics for the wa

r356317 - [WebAssembly] Use rethrow intrinsic in the rethrow block

2019-03-15 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Fri Mar 15 22:39:12 2019 New Revision: 356317 URL: http://llvm.org/viewvc/llvm-project?rev=356317&view=rev Log: [WebAssembly] Use rethrow intrinsic in the rethrow block Summary: Because in wasm we merge all catch clauses into one big catchpad, in case none of the types in ca

r356436 - [WebAssembly] Change wasm.throw's first argument to an immediate

2019-03-18 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Mon Mar 18 21:58:59 2019 New Revision: 356436 URL: http://llvm.org/viewvc/llvm-project?rev=356436&view=rev Log: [WebAssembly] Change wasm.throw's first argument to an immediate Summary: `wasm.throw` builtin's first 'tag' argument should be an immediate index into the event s

r353260 - [WebAssembly] Add atomics target option

2019-02-05 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Tue Feb 5 17:41:26 2019 New Revision: 353260 URL: http://llvm.org/viewvc/llvm-project?rev=353260&view=rev Log: [WebAssembly] Add atomics target option Reviewers: tlively Subscribers: dschuff, sbc100, jgravelle-google, sunfish, jfb, cfe-commits Tags: #clang Differential R

r353761 - [WebAssembly] Make thread-related options consistent

2019-02-11 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Mon Feb 11 14:47:50 2019 New Revision: 353761 URL: http://llvm.org/viewvc/llvm-project?rev=353761&view=rev Log: [WebAssembly] Make thread-related options consistent Summary: There have been three options related to threads and users had to set all three of them separately to

r313402 - Remove __builtin_wasm_rethrow builtin

2017-09-15 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Fri Sep 15 15:01:22 2017 New Revision: 313402 URL: http://llvm.org/viewvc/llvm-project?rev=313402&view=rev Log: Remove __builtin_wasm_rethrow builtin Summary: Remove `__builtin_wasm_rethrow` builtin. I thought it was required to implement `__cxa_rethrow` function in libcxxab

r313430 - [WebAssembly] Restore __builtin_wasm_rethrow builtin

2017-09-15 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Fri Sep 15 18:07:43 2017 New Revision: 313430 URL: http://llvm.org/viewvc/llvm-project?rev=313430&view=rev Log: [WebAssembly] Restore __builtin_wasm_rethrow builtin Summary: Restore the `__builtin_wasm_rethrow` builtin deleted in D37931. On second thought, it appears it can

[clang-tools-extra] r361687 - [clangd] tweaks: Add clangBasic dependency to LINK_LIBS

2019-05-24 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Fri May 24 18:35:14 2019 New Revision: 361687 URL: http://llvm.org/viewvc/llvm-project?rev=361687&view=rev Log: [clangd] tweaks: Add clangBasic dependency to LINK_LIBS This is necessary to make builds with `-DBUILD_SHARED_LIBS=ON` work. Modified: clang-tools-extra/trunk

[clang-tools-extra] r371706 - [clang-tidy] Fix build with -DBUILD_SHARED_LIB=ON

2019-09-11 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Wed Sep 11 20:10:57 2019 New Revision: 371706 URL: http://llvm.org/viewvc/llvm-project?rev=371706&view=rev Log: [clang-tidy] Fix build with -DBUILD_SHARED_LIB=ON Summary: This fixes build failures with `-DBUILD_SHARED_LIB=ON` after D67419. Reviewers: NoQ Subscribers: mgorn

r371708 - [WebAssembly] Add -fwasm-exceptions for wasm EH

2019-09-11 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Wed Sep 11 21:01:37 2019 New Revision: 371708 URL: http://llvm.org/viewvc/llvm-project?rev=371708&view=rev Log: [WebAssembly] Add -fwasm-exceptions for wasm EH Summary: This adds `-fwasm-exceptions` (in similar fashion with `-fdwarf-exceptions` or `-fsjlj-exceptions`) that t

r371711 - [WebAssembly] Make wasm-eh.cpp requires WebAssembly

2019-09-11 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Wed Sep 11 23:52:24 2019 New Revision: 371711 URL: http://llvm.org/viewvc/llvm-project?rev=371711&view=rev Log: [WebAssembly] Make wasm-eh.cpp requires WebAssembly D67208 added a new test line to wasm-eh.cpp that invokes the LLVM backend and this test fails on bots that don'

r371712 - [WebAssembly] Delete duplicate REQUIRES line

2019-09-11 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Wed Sep 11 23:56:17 2019 New Revision: 371712 URL: http://llvm.org/viewvc/llvm-project?rev=371712&view=rev Log: [WebAssembly] Delete duplicate REQUIRES line r371710 and r371711 committed the same line, so this deletes one of them. Modified: cfe/trunk/test/CodeGenCXX/was

r335791 - [analyzer] Add clangFrontend to target_link_libraries

2018-06-27 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Wed Jun 27 15:05:09 2018 New Revision: 335791 URL: http://llvm.org/viewvc/llvm-project?rev=335791&view=rev Log: [analyzer] Add clangFrontend to target_link_libraries Without this, builds with `-DSHARED_LIB=ON` fail. Modified: cfe/trunk/unittests/StaticAnalyzer/CMakeList

r336526 - [Index] Add clangLex to LINK_LIBS

2018-07-09 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Mon Jul 9 01:54:42 2018 New Revision: 336526 URL: http://llvm.org/viewvc/llvm-project?rev=336526&view=rev Log: [Index] Add clangLex to LINK_LIBS Without this, builds with `-DSHARED_LIB=ON` fail. Modified: cfe/trunk/lib/Index/CMakeLists.txt Modified: cfe/trunk/lib/Inde

[clang] 48acac3 - [WebAssembly] Warn on exception spec only when Wasm EH is used

2020-05-21 Thread Heejin Ahn via cfe-commits
Author: Heejin Ahn Date: 2020-05-21T17:08:35-07:00 New Revision: 48acac36293805cef10b448d49d336da7db7bfa9 URL: https://github.com/llvm/llvm-project/commit/48acac36293805cef10b448d49d336da7db7bfa9 DIFF: https://github.com/llvm/llvm-project/commit/48acac36293805cef10b448d49d336da7db7bfa9.diff LO

[clang] bca3475 - [WebAssembly] Handle exception specifications

2020-05-15 Thread Heejin Ahn via cfe-commits
Author: Heejin Ahn Date: 2020-05-15T21:03:38-07:00 New Revision: bca347508c86647f9d44992275c9a364fbd9fb0d URL: https://github.com/llvm/llvm-project/commit/bca347508c86647f9d44992275c9a364fbd9fb0d DIFF: https://github.com/llvm/llvm-project/commit/bca347508c86647f9d44992275c9a364fbd9fb0d.diff LO

[clang] 945ad14 - Revert "[WebAssembly] Handle exception specifications"

2020-05-15 Thread Heejin Ahn via cfe-commits
Author: Heejin Ahn Date: 2020-05-15T21:33:44-07:00 New Revision: 945ad141ce63c94b5822d52ad76c49aba906a4b8 URL: https://github.com/llvm/llvm-project/commit/945ad141ce63c94b5822d52ad76c49aba906a4b8 DIFF: https://github.com/llvm/llvm-project/commit/945ad141ce63c94b5822d52ad76c49aba906a4b8.diff LO

[clang] d94bacb - [WebAssembly] Handle exception specifications

2020-05-19 Thread Heejin Ahn via cfe-commits
Author: Heejin Ahn Date: 2020-05-19T01:16:09-07:00 New Revision: d94bacbcf87a06abc0c1fc3405406399460debc3 URL: https://github.com/llvm/llvm-project/commit/d94bacbcf87a06abc0c1fc3405406399460debc3 DIFF: https://github.com/llvm/llvm-project/commit/d94bacbcf87a06abc0c1fc3405406399460debc3.diff LO

[libunwind] [libunwind] Fix an inconsistent indentation (NFC) (PR #72314)

2023-11-14 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/72314 A fix was tried in https://github.com/llvm/llvm-project/commit/d080b5f1737b4040aa74a5614ae01338f28cd714 but the line is still inconsistent with the surrounding code. >From 6fdc1096db89073020ffb9daa248d0c18c8992e

[libunwind] [libunwind] Fix an inconsistent indentation (NFC) (PR #72314)

2023-11-14 Thread Heejin Ahn via cfe-commits
aheejin wrote: > Making it consistent is good, but it sounds like we should update the > .clang-format config file or reformat this whole file to not be indented. I'm not sure what the clang-format policy for libunwind is. How about landing this as is and updating `.clang-format` or excluding

[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)

2023-11-22 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/73196 Wasm doesn't use that file; Wasm does not allow access of system registers and those functionalities are provided from the VM. Wasm only uses https://github.com/llvm/llvm-project/blob/main/libunwind/src/Unwind-wa

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2023-12-12 Thread Heejin Ahn via cfe-commits
aheejin wrote: @trcrsired When we use it in Emscripten, we build it with `-D__USING_WASM_EXCEPTIONS__`. Does that work? I'm not sure which toolchain and libraries you are using though. (It looks you are using WASI, but does WASI have the EH support? Does it allow usage with llvm libunwind?) h

[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)

2023-11-27 Thread Heejin Ahn via cfe-commits
aheejin wrote: > The commit message is slightly misleading, it appears there are some parts of > the file that are actually used? As the commit message says, we only use https://github.com/llvm/llvm-project/blob/main/libunwind/src/Unwind-wasm.c and not libunwind.cpp. We don't use any parts of

[libunwind] [libunwind][WebAssembly] Don't build libunwind.cpp (PR #73196)

2023-11-28 Thread Heejin Ahn via cfe-commits
aheejin wrote: Hmm, yes, I thought we didn't build `libunwind.cpp` because the code next to the part I excluded was wrapped with `#ifdef __APPLE__`: https://github.com/llvm/llvm-project/blob/a8ac930b99d93b2a539ada7e566993d148899144/libunwind/src/libunwind.cpp#L352-L432 But yeah then we build th

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2023-11-28 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2023-11-28 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2023-11-28 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/73196 >From cb110aba7df1c74e3c5f21664f9e22515a1d820f Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Wed, 22 Nov 2023 18:18:19 -0800 Subject: [PATCH] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Was

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2023-11-29 Thread Heejin Ahn via cfe-commits
aheejin wrote: I think the CI failures are unrelated. Merging. https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2023-11-29 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/73196 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -1738,10 +1792,16 @@ void WebAssemblyLowerEmscriptenEHSjLj::handleLongjmpableCallsForWasmSjLj( BasicBlock *ThenBB = BasicBlock::Create(C, "if.then", &F); BasicBlock *EndBB = BasicBlock::Create(C, "if.end", &F); Value *EnvP = IRB.CreateBitCast(Env, getAddrPtrType(&M),

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -999,25 +1017,43 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) { // Register __wasm_longjmp function, which calls __builtin_wasm_longjmp. FunctionType *FTy = FunctionType::get( IRB.getVoidTy(), {Int8PtrTy, IRB.getInt32Ty()}, false);

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -1291,19 +1327,29 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) { Type *IntPtrTy = getAddrIntType(&M); Constant *size = ConstantInt::get(IntPtrTy, 40); IRB.SetInsertPoint(SetjmpTableSize); - auto *SetjmpTable = IRB.CreateMalloc(IntPtrTy, IR

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -1291,19 +1327,29 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) { Type *IntPtrTy = getAddrIntType(&M); Constant *size = ConstantInt::get(IntPtrTy, 40); IRB.SetInsertPoint(SetjmpTableSize); - auto *SetjmpTable = IRB.CreateMalloc(IntPtrTy, IR

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -198,9 +198,18 @@ /// /// If there are calls to setjmp() /// -/// 2) and 3): The same as 2) and 3) in Emscripten SjLj. -/// (setjmpTable/setjmpTableSize initialization + setjmp callsite -/// transformation) +/// 2) In the function entry that calls setjmp, initialize +///

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: If possible, can you not force-push? It's hard to track changes between commits with force-pushes. Thank you! https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-13 Thread Heejin Ahn via cfe-commits
@@ -198,9 +198,18 @@ /// /// If there are calls to setjmp() /// -/// 2) and 3): The same as 2) and 3) in Emscripten SjLj. -/// (setjmpTable/setjmpTableSize initialization + setjmp callsite -/// transformation) +/// 2) In the function entry that calls setjmp, initialize +///

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-15 Thread Heejin Ahn via cfe-commits
@@ -129,27 +129,21 @@ /// /// If there are calls to setjmp() /// -/// 2) In the function entry that calls setjmp, initialize setjmpTable and -///sejmpTableSize as follows: -/// setjmpTableSize = 4; -/// setjmpTable = (int *) malloc(40); -/// setjmpTable[0] =

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-15 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: Nice simplification! Thank you for working on this. Some minor nits about comments: - You removed https://github.com/llvm/llvm-project/blob/43fc921795bd130a325c013d60f209b5c6128fc7/llvm/lib/Target/WebAssembly/WebAssemblyLowerEmscriptenEHSjLj.cpp#L213-L215

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-15 Thread Heejin Ahn via cfe-commits
@@ -1268,42 +1259,21 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) { LLVMContext &C = F.getContext(); IRBuilder<> IRB(C); SmallVector ToErase; - // Vector of %setjmpTable values - SmallVector SetjmpTableInsts; - // Vector of %setjmpTableSize

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-15 Thread Heejin Ahn via cfe-commits
@@ -129,27 +129,21 @@ /// /// If there are calls to setjmp() /// -/// 2) In the function entry that calls setjmp, initialize setjmpTable and -///sejmpTableSize as follows: -/// setjmpTableSize = 4; -/// setjmpTable = (int *) malloc(40); -/// setjmpTable[0] =

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-15 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-15 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-21 Thread Heejin Ahn via cfe-commits
aheejin wrote: @yamt Given that this PR is not large and we already went through it anyway, nevermind what I said about rebasing, and please use whatever method you are convenient with. But just FYI you can do `git merge` to avoid rebasing (I'm not asking you to do it here; just in case you a

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-21 Thread Heejin Ahn via cfe-commits
aheejin wrote: I'm not sure about the common practice in this repo, but Github in general supports merge workflows much better. Especially in a long-running large PRs, if you force-push, it's hard for the reviewers to know what has changed since their last review, because all the history his l

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-21 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Cleanup feature tests (PR #80780)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/80780 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Add tests for generic CPU config (PR #80775)

2024-02-06 Thread Heejin Ahn via cfe-commits
aheejin wrote: Ah, I didn't notice there's `DEFAULT` tests in `wasm-features.c`... But more importantly, I noticed `wasm-features.c` tests don't work as intended anyway. I am planning to delete that test. So I'll make this PR just update the `wasm-target-features.c`. https://github.com/llvm/l

[clang] [WebAssembly] Add tests for generic CPU config (PR #80775)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/80775 >From dbb74ca85ef047260a2820f6d470448279ea44f4 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 6 Feb 2024 00:51:40 + Subject: [PATCH 1/3] [WebAssembly] Add tests for generic CPU config This adds tests f

[clang] [WebAssembly] Remove wasm-features.c test (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/80900 This test is not working as intended. Specifying `-mcpu=[mvp|generic|bleeding-edge]` in `clang` command line does NOT add arguments like `-target-feature`, `+feature-name`, ... to `clang-14` command line. Specif

[clang] [WebAssembly] Remove wasm-features.c test (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/80900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Remove wasm-features.c test (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
aheejin wrote: Sorry, I was confused. Enabling individual features with `-mfeature-name` to `clang` adds `-target-feature` `feature-name` to the `clang-14` as intended. Only the `-mcpu` tests were not working as intended. I think I need to only delete the parts that test CPUs instead. https:/

[clang] [WebAssembly] Remove wasm-features.c test (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/80900 >From 540b5036be1ae1d867b5d3a48b31fa7a1f415898 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 6 Feb 2024 19:28:18 + Subject: [PATCH 1/2] [WebAssembly] Remove wasm-features.c test This test is not worki

[clang] [WebAssembly] Remove wasm-features.c test (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/80900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Remove CPU tests from wasm-features.c (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/80900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Cleanup feature tests (PR #80780)

2024-02-06 Thread Heejin Ahn via cfe-commits
@@ -50,3 +60,73 @@ // DEFAULT-NOT: "-target-feature" "-multimemory" // MVP-NOT: "-target-feature" "+multimemory" // BLEEDING-EDGE-NOT: "-target-feature" "-multimemory" + +// RUN: %clang --target=wasm32-unknown-unknown -### %s -matomics 2>&1 | FileCheck %s -check-prefix=ATOMICS

[clang] [WebAssembly] Remove CPU tests from wasm-features.c (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
aheejin wrote: Hmm, on second thought, I think it'd be better to test `-target-cpu` lines instead than deleting the whole thing. Sorry for the flip-flopping. https://github.com/llvm/llvm-project/pull/80900 ___ cfe-commits mailing list cfe-commits@list

[clang] [WebAssembly] Remove CPU tests from wasm-features.c (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/80900 >From 540b5036be1ae1d867b5d3a48b31fa7a1f415898 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 6 Feb 2024 19:28:18 + Subject: [PATCH 1/3] [WebAssembly] Remove wasm-features.c test This test is not worki

[clang] [WebAssembly] Fix CPU tests from wasm-features.c (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/80900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Fix CPU tests in wasm-features.c (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/80900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Fix CPU tests in wasm-features.c (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/80900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Add tests for generic CPU config (PR #80775)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/80775 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Fix CPU tests in wasm-features.c (PR #80900)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/80900 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Add more features to generic CPU config (PR #80923)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/80923 This enables nontrapping-fptoint, multivlaue, reference-types, and bulk-memory in `-mcpu=generic` configuration. These proposals have been standardized and supported in all major browsers for several years at th

[clang] [WebAssembly] Add more features to generic CPU config (PR #80923)

2024-02-06 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/80923 >From d6fd48794112d6c140024d7cd55b5fe5e55e Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 6 Feb 2024 00:31:59 + Subject: [PATCH] [WebAssembly] Add more features to generic CPU config This enables n

[clang] [WebAssembly] Add more features to generic CPU config (PR #80923)

2024-02-06 Thread Heejin Ahn via cfe-commits
aheejin wrote: Tried running Emscripten tests, and some of them fail with reference-types or bulk-memory. I haven't investigated the cause yet, but it could be better to start with the other two (nontrapping-fptoint and multivalue). https://github.com/llvm/llvm-project/pull/80923 _

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-06 Thread Heejin Ahn via cfe-commits
aheejin wrote: Can I take a look before landing this? I'm OOO this afternoon but will be back tomorrow. https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/list

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: Nice work! Sorry for the late reply. I thought we needed the table because we need to distinguish two different calls from the same function, for example, if `foo` calls `setjmp` and also recursively calls `foo` again, so the same callsite can have two dif

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -300,6 +315,7 @@ class WebAssemblyLowerEmscriptenEHSjLj final : public ModulePass { bool EnableEmEH; // Enable Emscripten exception handling bool EnableEmSjLj; // Enable Emscripten setjmp/longjmp handling bool EnableWasmSjLj; // Enable Wasm setjmp/longjmp handli

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -386,6 +386,20 @@ void WebAssembly::addClangTargetOptions(const ArgList &DriverArgs, // Backend needs '-exception-model=wasm' to use Wasm EH instructions CC1Args.push_back("-exception-model=wasm"); } + +if (Opt.starts_with("-experimental-wasm-enable-alt-

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -1738,10 +1792,16 @@ void WebAssemblyLowerEmscriptenEHSjLj::handleLongjmpableCallsForWasmSjLj( BasicBlock *ThenBB = BasicBlock::Create(C, "if.then", &F); BasicBlock *EndBB = BasicBlock::Create(C, "if.end", &F); Value *EnvP = IRB.CreateBitCast(Env, getAddrPtrType(&M),

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -54,6 +54,9 @@ cl::opt // setjmp/longjmp handling using wasm EH instrutions cl::opt WebAssembly::WasmEnableSjLj( "wasm-enable-sjlj", cl::desc("WebAssembly setjmp/longjmp handling")); +cl::opt WebAssembly::WasmEnableAltSjLj( +"experimental-wasm-enable-alt-sjlj", +

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -1291,19 +1327,29 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) { Type *IntPtrTy = getAddrIntType(&M); Constant *size = ConstantInt::get(IntPtrTy, 40); IRB.SetInsertPoint(SetjmpTableSize); - auto *SetjmpTable = IRB.CreateMalloc(IntPtrTy, IR

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -1291,19 +1327,29 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) { Type *IntPtrTy = getAddrIntType(&M); Constant *size = ConstantInt::get(IntPtrTy, 40); IRB.SetInsertPoint(SetjmpTableSize); - auto *SetjmpTable = IRB.CreateMalloc(IntPtrTy, IR

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -1291,19 +1327,29 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runSjLjOnFunction(Function &F) { Type *IntPtrTy = getAddrIntType(&M); Constant *size = ConstantInt::get(IntPtrTy, 40); IRB.SetInsertPoint(SetjmpTableSize); - auto *SetjmpTable = IRB.CreateMalloc(IntPtrTy, IR

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
@@ -999,25 +1017,43 @@ bool WebAssemblyLowerEmscriptenEHSjLj::runOnModule(Module &M) { // Register __wasm_longjmp function, which calls __builtin_wasm_longjmp. FunctionType *FTy = FunctionType::get( IRB.getVoidTy(), {Int8PtrTy, IRB.getInt32Ty()}, false);

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
aheejin wrote: > In terms of getting this landed and tested, I wonder which path we should > take: > > 1. Land this now, without tests, then update emscripten then come back and > flip the default, at which point the existing tests will get updated. > 2. Duplicate/update the the existing tests

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-08 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin edited https://github.com/llvm/llvm-project/pull/84137 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-09 Thread Heejin Ahn via cfe-commits
aheejin wrote: > > > In terms of getting this landed and tested, I wonder which path we should > > > take: > > > > > > 1. Land this now, without tests, then update emscripten then come back > > > and flip the default, at which point the existing tests will get updated. > > > 2. Duplicate/updat

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-11 Thread Heejin Ahn via cfe-commits
aheejin wrote: Had a chance to chat with @sbc100 offline and we agreed we can probably do this: > 1. Add library functions in emscripten > 2. Replace the current logic in LLVM with new code. (Without `if`~`else`). > Tests can be updated with this. > 3. Remove old library functions in emscripten

[clang] [llvm] [WebAssembly] Implement an alternative translation for -wasm-enable-sjlj (PR #84137)

2024-03-11 Thread Heejin Ahn via cfe-commits
aheejin wrote: > > > Given that we don't need `setjmpTableSize` anymore and `setjmpTable` > > > doesn't change, we don't need the whole block here from line 1463 ~ line > > > 1503 doing SSA updates anymore: > > > > > > i get errors like the following if i simply put the SSA update things in

[clang] [WebAssembly] Add tests for generic CPU config (PR #80775)

2024-02-05 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/80775 This adds tests for `generic` cpu configuration. We had tests for `mvp` and `bleeding-edge` configs but not `generic`. >From dbb74ca85ef047260a2820f6d470448279ea44f4 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Da

[clang] [WebAssembly] Add tests for generic CPU config (PR #80775)

2024-02-05 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/80775 >From dbb74ca85ef047260a2820f6d470448279ea44f4 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 6 Feb 2024 00:51:40 + Subject: [PATCH 1/2] [WebAssembly] Add tests for generic CPU config This adds tests f

[libunwind] [libunwind][WebAssembly] Fix libunwind.cpp guard (PR #78230)

2024-01-15 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/78230 This should have been `&&`, meaning neither SjLj nor Wasm uses this file. >From 9ddfd0446342ea3c257b5d1d104f957a83c01e3c Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Mon, 15 Jan 2024 20:06:48 -0800 Subject: [

[libunwind] [libunwind][WebAssembly] Omit unused parts of libunwind.cpp for Wasm (PR #73196)

2024-01-15 Thread Heejin Ahn via cfe-commits
@@ -26,7 +26,7 @@ #include #endif -#if !defined(__USING_SJLJ_EXCEPTIONS__) +#if !defined(__USING_SJLJ_EXCEPTIONS__) || !defined(__USING_WASM_EXCEPTIONS__) aheejin wrote: Sorry, fixed in #78230. https://github.com/llvm/llvm-project/pull/73196 ___

[clang-tools-extra] r370273 - [clangd] Fix ExtractFunction dependencies

2019-08-28 Thread Heejin Ahn via cfe-commits
Author: aheejin Date: Wed Aug 28 16:17:38 2019 New Revision: 370273 URL: http://llvm.org/viewvc/llvm-project?rev=370273&view=rev Log: [clangd] Fix ExtractFunction dependencies Summary: Without these dependencies, builds with `-DBUILD_SHARED_LIBS=ON` fail. Reviewers: SureYeaah Subscribers: mgorn

  1   2   3   4   >