[clang] [WebAssembly] Re-enable reference types by default (PR #93261)

2024-06-20 Thread Heejin Ahn via cfe-commits

https://github.com/aheejin closed 
https://github.com/llvm/llvm-project/pull/93261
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Re-enable reference types by default (PR #93261)

2024-06-20 Thread Heejin Ahn via cfe-commits

aheejin wrote:

Given that the node version in Chromium CI has been updated successfully 
(https://chromium-review.googlesource.com/c/emscripten-releases/+/5503423), I'm 
gonna land this.

https://github.com/llvm/llvm-project/pull/93261
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Re-enable reference types by default (PR #93261)

2024-05-24 Thread Derek Schuff via cfe-commits

https://github.com/dschuff approved this pull request.


https://github.com/llvm/llvm-project/pull/93261
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Re-enable reference types by default (PR #93261)

2024-05-23 Thread Heejin Ahn via cfe-commits

https://github.com/aheejin updated 
https://github.com/llvm/llvm-project/pull/93261

>From 25fc2c2caa1b6bdc4883b1349fa4e75e670a0ffa Mon Sep 17 00:00:00 2001
From: Heejin Ahn 
Date: Fri, 24 May 2024 01:02:26 +
Subject: [PATCH 1/2] Re-enable reference types by default

Now that we are about to upgrade emsdk's default node to v18.20.3
(https://github.com/emscripten-core/emsdk/pull/1387), we can re-enable
reference-types by default again. This effectively reverts #90792.
---
 clang/docs/ReleaseNotes.rst| 8 
 clang/lib/Basic/Targets/WebAssembly.cpp| 2 +-
 clang/test/Preprocessor/wasm-target-features.c | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 2b35e2162ab5b..dfc1af8c4be8a 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -881,10 +881,10 @@ AIX Support
 WebAssembly Support
 ^^^
 
-The -mcpu=generic configuration now enables multivalue feature, which is
-standardized and available in all major engines. Enabling multivalue here only
-enables the language feature but does not turn on the multivalue ABI (this
-enables non-ABI uses of multivalue, like exnref).
+The -mcpu=generic configuration now enables multivalue and 
reference-types.These
+proposals are standardized and available in all major engines. Enabling
+multivalue here only enables the language feature but does not turn on the
+multivalue ABI (this enables non-ABI uses of multivalue, like exnref).
 
 AVR Support
 ^^^
diff --git a/clang/lib/Basic/Targets/WebAssembly.cpp 
b/clang/lib/Basic/Targets/WebAssembly.cpp
index 5a000314a72ce..1e565f0a5319f 100644
--- a/clang/lib/Basic/Targets/WebAssembly.cpp
+++ b/clang/lib/Basic/Targets/WebAssembly.cpp
@@ -153,6 +153,7 @@ bool WebAssemblyTargetInfo::initFeatureMap(
   auto addGenericFeatures = [&]() {
 Features["multivalue"] = true;
 Features["mutable-globals"] = true;
+Features["reference-types"] = true;
 Features["sign-ext"] = true;
   };
   auto addBleedingEdgeFeatures = [&]() {
@@ -164,7 +165,6 @@ bool WebAssemblyTargetInfo::initFeatureMap(
 Features["half-precision"] = true;
 Features["multimemory"] = true;
 Features["nontrapping-fptoint"] = true;
-Features["reference-types"] = true;
 Features["tail-call"] = true;
 setSIMDLevel(Features, RelaxedSIMD, true);
   };
diff --git a/clang/test/Preprocessor/wasm-target-features.c 
b/clang/test/Preprocessor/wasm-target-features.c
index 9d49e3af603f8..d5539163b3bf5 100644
--- a/clang/test/Preprocessor/wasm-target-features.c
+++ b/clang/test/Preprocessor/wasm-target-features.c
@@ -164,6 +164,7 @@
 //
 // GENERIC-INCLUDE-DAG: #define __wasm_multivalue__ 1{{$}}
 // GENERIC-INCLUDE-DAG: #define __wasm_mutable_globals__ 1{{$}}
+// GENERIC-INCLUDE-DAG: #define __wasm_reference_types__ 1{{$}}
 // GENERIC-INCLUDE-DAG: #define __wasm_sign_ext__ 1{{$}}
 //
 // RUN: %clang -E -dM %s -o - 2>&1 \
@@ -180,7 +181,6 @@
 // GENERIC-NOT: #define __wasm_half_precision__ 1{{$}}
 // GENERIC-NOT: #define __wasm_multimemory__ 1{{$}}
 // GENERIC-NOT: #define __wasm_nontrapping_fptoint__ 1{{$}}
-// GENERIC-NOT: #define __wasm_reference_types__ 1{{$}}
 // GENERIC-NOT: #define __wasm_relaxed_simd__ 1{{$}}
 // GENERIC-NOT: #define __wasm_simd128__ 1{{$}}
 // GENERIC-NOT: #define __wasm_tail_call__ 1{{$}}

>From fdddba56cc93c2d3d11237cceb48501c10e1efb2 Mon Sep 17 00:00:00 2001
From: Heejin Ahn 
Date: Fri, 24 May 2024 01:08:38 +
Subject: [PATCH 2/2] space

---
 clang/docs/ReleaseNotes.rst | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index dfc1af8c4be8a..8a91b94c7e802 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -881,8 +881,8 @@ AIX Support
 WebAssembly Support
 ^^^
 
-The -mcpu=generic configuration now enables multivalue and 
reference-types.These
-proposals are standardized and available in all major engines. Enabling
+The -mcpu=generic configuration now enables multivalue and reference-types.
+These proposals are standardized and available in all major engines. Enabling
 multivalue here only enables the language feature but does not turn on the
 multivalue ABI (this enables non-ABI uses of multivalue, like exnref).
 

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Re-enable reference types by default (PR #93261)

2024-05-23 Thread Heejin Ahn via cfe-commits

aheejin wrote:

This should land after the node-updating PRs land.

https://github.com/llvm/llvm-project/pull/93261
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Re-enable reference types by default (PR #93261)

2024-05-23 Thread via cfe-commits

llvmbot wrote:




@llvm/pr-subscribers-clang

Author: Heejin Ahn (aheejin)


Changes

Now that we are about to upgrade emsdk's default node to v18.20.3 
(https://github.com/emscripten-core/emsdk/pull/1387), we can re-enable 
reference-types by default again. This effectively reverts #90792.

---
Full diff: https://github.com/llvm/llvm-project/pull/93261.diff


3 Files Affected:

- (modified) clang/docs/ReleaseNotes.rst (+4-4) 
- (modified) clang/lib/Basic/Targets/WebAssembly.cpp (+1-1) 
- (modified) clang/test/Preprocessor/wasm-target-features.c (+1-1) 


``diff
diff --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 2b35e2162ab5b..dfc1af8c4be8a 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -881,10 +881,10 @@ AIX Support
 WebAssembly Support
 ^^^
 
-The -mcpu=generic configuration now enables multivalue feature, which is
-standardized and available in all major engines. Enabling multivalue here only
-enables the language feature but does not turn on the multivalue ABI (this
-enables non-ABI uses of multivalue, like exnref).
+The -mcpu=generic configuration now enables multivalue and 
reference-types.These
+proposals are standardized and available in all major engines. Enabling
+multivalue here only enables the language feature but does not turn on the
+multivalue ABI (this enables non-ABI uses of multivalue, like exnref).
 
 AVR Support
 ^^^
diff --git a/clang/lib/Basic/Targets/WebAssembly.cpp 
b/clang/lib/Basic/Targets/WebAssembly.cpp
index 5a000314a72ce..1e565f0a5319f 100644
--- a/clang/lib/Basic/Targets/WebAssembly.cpp
+++ b/clang/lib/Basic/Targets/WebAssembly.cpp
@@ -153,6 +153,7 @@ bool WebAssemblyTargetInfo::initFeatureMap(
   auto addGenericFeatures = [&]() {
 Features["multivalue"] = true;
 Features["mutable-globals"] = true;
+Features["reference-types"] = true;
 Features["sign-ext"] = true;
   };
   auto addBleedingEdgeFeatures = [&]() {
@@ -164,7 +165,6 @@ bool WebAssemblyTargetInfo::initFeatureMap(
 Features["half-precision"] = true;
 Features["multimemory"] = true;
 Features["nontrapping-fptoint"] = true;
-Features["reference-types"] = true;
 Features["tail-call"] = true;
 setSIMDLevel(Features, RelaxedSIMD, true);
   };
diff --git a/clang/test/Preprocessor/wasm-target-features.c 
b/clang/test/Preprocessor/wasm-target-features.c
index 9d49e3af603f8..d5539163b3bf5 100644
--- a/clang/test/Preprocessor/wasm-target-features.c
+++ b/clang/test/Preprocessor/wasm-target-features.c
@@ -164,6 +164,7 @@
 //
 // GENERIC-INCLUDE-DAG: #define __wasm_multivalue__ 1{{$}}
 // GENERIC-INCLUDE-DAG: #define __wasm_mutable_globals__ 1{{$}}
+// GENERIC-INCLUDE-DAG: #define __wasm_reference_types__ 1{{$}}
 // GENERIC-INCLUDE-DAG: #define __wasm_sign_ext__ 1{{$}}
 //
 // RUN: %clang -E -dM %s -o - 2>&1 \
@@ -180,7 +181,6 @@
 // GENERIC-NOT: #define __wasm_half_precision__ 1{{$}}
 // GENERIC-NOT: #define __wasm_multimemory__ 1{{$}}
 // GENERIC-NOT: #define __wasm_nontrapping_fptoint__ 1{{$}}
-// GENERIC-NOT: #define __wasm_reference_types__ 1{{$}}
 // GENERIC-NOT: #define __wasm_relaxed_simd__ 1{{$}}
 // GENERIC-NOT: #define __wasm_simd128__ 1{{$}}
 // GENERIC-NOT: #define __wasm_tail_call__ 1{{$}}

``




https://github.com/llvm/llvm-project/pull/93261
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[clang] [WebAssembly] Re-enable reference types by default (PR #93261)

2024-05-23 Thread Heejin Ahn via cfe-commits

https://github.com/aheejin edited 
https://github.com/llvm/llvm-project/pull/93261
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits