https://github.com/aheejin edited
https://github.com/llvm/llvm-project/pull/117087
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -310,6 +332,18 @@ bool WebAssemblyTargetInfo::handleTargetFeatures(
<< Feature << "-target-feature";
return false;
}
+
+ // The reference-types feature included the change to `call_indirect`
+ // encodings to support overlong immediates.
+ if (HasReferenceTy
@@ -79,6 +81,8 @@ void WebAssemblyTargetInfo::getTargetDefines(const
LangOptions &Opts,
Builder.defineMacro("__wasm_atomics__");
if (HasBulkMemory)
Builder.defineMacro("__wasm_bulk_memory__");
+ if (HasBulkMemoryOpt)
+Builder.defineMacro("__wasm_bulk_memory_opt_
@@ -114,19 +122,20 @@ def : ProcessorModel<"mvp", NoSchedModel, []>;
// consideration given to available support in relevant engines and tools, and
// the importance of the features.
def : ProcessorModel<"generic", NoSchedModel,
- [FeatureBulkMemory, Featur
@@ -114,19 +122,20 @@ def : ProcessorModel<"mvp", NoSchedModel, []>;
// consideration given to available support in relevant engines and tools, and
// the importance of the features.
def : ProcessorModel<"generic", NoSchedModel,
- [FeatureBulkMemory, Featur
@@ -265,6 +279,14 @@ bool WebAssemblyTargetInfo::handleTargetFeatures(
HasReferenceTypes = false;
continue;
}
+if (Feature == "+call-indirect-overlong") {
+ HasCallIndirectOverlong = true;
+ continue;
+}
+if (Feature == "-call-indirect-over
https://github.com/aheejin edited
https://github.com/llvm/llvm-project/pull/117087
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/aheejin commented:
All of the below are nits on feature name ordering:
https://github.com/llvm/llvm-project/pull/117087
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commi
@@ -34,6 +34,15 @@
WebAssemblySubtarget::initializeSubtargetDependencies(StringRef CPU,
CPU = "generic";
ParseSubtargetFeatures(CPU, /*TuneCPU*/ CPU, FS);
+
+ // reference-types implies call-indirect-overlong
+ if (HasReferenceTypes)
+HasCallIndirectOverlong = tru
@@ -114,19 +122,20 @@ def : ProcessorModel<"mvp", NoSchedModel, []>;
// consideration given to available support in relevant engines and tools, and
// the importance of the features.
def : ProcessorModel<"generic", NoSchedModel,
- [FeatureBulkMemory, Featur
aheejin wrote:
@llvm-ci The failure seems irrelevant.
https://github.com/llvm/llvm-project/pull/124042
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/aheejin closed
https://github.com/llvm/llvm-project/pull/124374
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/aheejin created
https://github.com/llvm/llvm-project/pull/124374
#124042 caused a problem that when invoking `clang` with multiple files, the
static `HasRun` variables were set when processing the first file so the
appropriate feature flags were not added from the second fi
https://github.com/aheejin closed
https://github.com/llvm/llvm-project/pull/124042
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -120,26 +120,33 @@
// RUN: | FileCheck -check-prefix=EMSCRIPTEN_EH_ALLOWED_WO_ENABLE %s
// EMSCRIPTEN_EH_ALLOWED_WO_ENABLE: invalid argument '-mllvm
-emscripten-cxx-exceptions-allowed' only allowed with '-mllvm
-enable-emscripten-cxx-exceptions'
-// '-fwasm-exceptions'
@@ -154,46 +161,46 @@
// WASM_EXCEPTIONS_NO_REFERENCE_TYPES: invalid argument '-fwasm-exceptions'
not allowed with '-mno-reference-types'
// '-mllvm -wasm-enable-sjlj' sets +exception-handling, +multivalue,
-// +reference-types and '-exception-model=wasm'
+// +reference-type
@@ -120,26 +120,33 @@
// RUN: | FileCheck -check-prefix=EMSCRIPTEN_EH_ALLOWED_WO_ENABLE %s
// EMSCRIPTEN_EH_ALLOWED_WO_ENABLE: invalid argument '-mllvm
-emscripten-cxx-exceptions-allowed' only allowed with '-mllvm
-enable-emscripten-cxx-exceptions'
-// '-fwasm-exceptions'
@@ -413,53 +422,11 @@ void WebAssembly::addClangTargetOptions(const ArgList
&DriverArgs,
}
}
-if (Opt.starts_with("-wasm-enable-sjlj")) {
- // '-mllvm -wasm-enable-sjlj' is not compatible with
- // '-mno-exception-handling'
- if (DriverArgs.hasFla
https://github.com/aheejin created
https://github.com/llvm/llvm-project/pull/122466
There were many overlaps between error checking and feature enabling routines
for Wasm EH and Wasm SjLj. This tries to factor out those common routines in
separate lambda functions.
This is not NFC because thi
https://github.com/aheejin closed
https://github.com/llvm/llvm-project/pull/122466
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/aheejin created
https://github.com/llvm/llvm-project/pull/122526
This adds checks for `-wasm-use-legacy-eh`. While this option is true by
default in the backend, it is not supposed to be given to the Clang when Wasm
EH is not used.
>From 0a64591d452b5f79d911d4a4ce36016761df
https://github.com/aheejin closed
https://github.com/llvm/llvm-project/pull/124365
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
aheejin wrote:
@llvm-ci The CI failure does not look relevant.
https://github.com/llvm/llvm-project/pull/130220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/aheejin created
https://github.com/llvm/llvm-project/pull/130220
I think it is generally better for tests have some descriptive function names
so that we can insert new tests in the middle and don't have to renumber all
tests.
Also recently I added a (named) test to this fi
https://github.com/aheejin closed
https://github.com/llvm/llvm-project/pull/130220
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/aheejin updated
https://github.com/llvm/llvm-project/pull/129020
>From 92861b903905d4f3d2fa39772033282b2dbad758 Mon Sep 17 00:00:00 2001
From: Heejin Ahn
Date: Thu, 27 Feb 2025 03:09:45 +
Subject: [PATCH 1/3] [WebAssembly] Generate __clang_call_terminate for
Emscripten E
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 %s -triple wasm32-unknown-unknown -fexceptions
-fcxx-exceptions -emit-llvm -o - -std=c++11 2>&1 | FileCheck %s
aheejin wrote:
We don't do anything differently wrt EH depending on whether it is `unknown` or
`emscripten` tripl
https://github.com/aheejin updated
https://github.com/llvm/llvm-project/pull/129020
>From 92861b903905d4f3d2fa39772033282b2dbad758 Mon Sep 17 00:00:00 2001
From: Heejin Ahn
Date: Thu, 27 Feb 2025 03:09:45 +
Subject: [PATCH 1/2] [WebAssembly] Generate __clang_call_terminate for
Emscripten E
@@ -5150,9 +5150,14 @@
WebAssemblyCXXABI::emitTerminateForUnexpectedException(CodeGenFunction &CGF,
// Itanium ABI calls __clang_call_terminate(), which __cxa_begin_catch() on
// the violating exception to mark it handled, but it is currently hard to do
// with wasm EH i
https://github.com/aheejin closed
https://github.com/llvm/llvm-project/pull/129020
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown -fexceptions
-fcxx-exceptions -target-feature +reference-types -target-feature
+exception-handling -target-feature +multivalue -exception-model=wasm
-emit-llvm -o - %s | FileCheck %s
+
+// Check if __builtin_wa
@@ -0,0 +1,20 @@
+// RUN: %clang_cc1 -triple wasm32-unknown-unknown -fexceptions
-fcxx-exceptions -target-feature +reference-types -target-feature
+exception-handling -target-feature +multivalue -exception-model=wasm
-emit-llvm -o - %s | FileCheck %s
+
+// Check if __builtin_wa
https://github.com/aheejin closed
https://github.com/llvm/llvm-project/pull/128105
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/aheejin updated
https://github.com/llvm/llvm-project/pull/128105
>From 8702f84a3f3271e97bc963e997b9f441f05e83da Mon Sep 17 00:00:00 2001
From: Heejin Ahn
Date: Thu, 20 Feb 2025 22:23:33 +
Subject: [PATCH] [WebAssembly] Generate invokes with llvm.wasm.(re)throw
Even thoug
https://github.com/aheejin created
https://github.com/llvm/llvm-project/pull/129020
When an exception thrown ends up calling `std::terminate`, for example, because
an exception is thrown within a `noexcept` function or an exception is thrown
from `__cxa_end_catch` during handling the previous
https://github.com/aheejin edited
https://github.com/llvm/llvm-project/pull/146230
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5276,6 +5276,8 @@ def mtail_call : Flag<["-"], "mtail-call">,
Group;
def mno_tail_call : Flag<["-"], "mno-tail-call">, Group;
def mwide_arithmetic : Flag<["-"], "mwide-arithmetic">,
Group;
def mno_wide_arithmetic : Flag<["-"], "mno-wide-arithmetic">,
Group;
+def mbranch_
@@ -2562,8 +2565,9 @@ void
WebAssemblyCFGStackify::rewriteDepthImmediates(MachineFunction &MF) {
MO = MachineOperand::CreateImm(getDelegateDepth(Stack, MO.getMBB()));
else if (MI.getOpcode() == WebAssembly::RETHROW)
MO = MachineOperand::CreateImm(ge
@@ -2608,6 +2612,21 @@ void
WebAssemblyCFGStackify::rewriteDepthImmediates(MachineFunction &MF) {
Stack.push_back(std::make_pair(&MBB, &MI));
break;
+ case WebAssembly::BR_IF: {
+// this is the last place where we can easily calculate the branch
+
@@ -2608,6 +2612,21 @@ void
WebAssemblyCFGStackify::rewriteDepthImmediates(MachineFunction &MF) {
Stack.push_back(std::make_pair(&MBB, &MI));
break;
+ case WebAssembly::BR_IF: {
+// this is the last place where we can easily calculate the branch
+
https://github.com/aheejin commented:
Thanks! So far I've only read the CFG parts and feature-adding parts, but some
comments:
https://github.com/llvm/llvm-project/pull/146230
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.
@@ -1,4 +1,4 @@
-# RUN: llc -mtriple=wasm32-unknown-unknown -wasm-use-legacy-eh
-exception-model=wasm -mattr=+exception-handling -run-pass wasm-cfg-stackify %s
-o - | FileCheck %s
+# RUN: llc -mtriple=wasm32-unknown-unknown -wasm-use-legacy-eh
-wasm-enable-sjlj -exception-model
aheejin wrote:
> > And it was a little confusing that the PR description argues we should
> > remove `-wasm-enable-eh/sjlj` options, which disagree, when the code seems
> > to fix something else. Those flags control behaviors, not exception models,
> > so we still need them. For example, someo
https://github.com/aheejin edited
https://github.com/llvm/llvm-project/pull/146230
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/aheejin approved this pull request.
What was the cause for the yesterday's error?
https://github.com/llvm/llvm-project/pull/151294
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
aheejin wrote:
Tests failures don't seem to be related to this PR. Merged.
https://github.com/llvm/llvm-project/pull/151107
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/aheejin closed
https://github.com/llvm/llvm-project/pull/151107
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
aheejin wrote:
> https://github.com/llvm/llvm-project/blob/main/clang/test/Driver/wasm-features.c
> needs to be updated too. For example, this is `fp16`:
>
> https://github.com/llvm/llvm-project/blob/052b836d2384c8a583ae5f945dcdcfba2004bbb0/clang/test/Driver/wasm-features.c#L38-L42
I don't thi
@@ -11,6 +11,8 @@
#define _LIBUNWIND_VERSION 15000
+// Disable clang-format as it makes the huge conditions unreadable.
+// clang-format off
aheejin wrote:
Sorry maybe I'm missing something, but your change doesn't look like it's
flattening everything:
http
@@ -11,6 +11,8 @@
#define _LIBUNWIND_VERSION 15000
+// Disable clang-format as it makes the huge conditions unreadable.
+// clang-format off
aheejin wrote:
Sorry I thought this makes incorrect indentations correct..?
https://github.com/llvm/llvm-project/pu
https://github.com/aheejin edited
https://github.com/llvm/llvm-project/pull/152861
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -11,6 +11,8 @@
#define _LIBUNWIND_VERSION 15000
+// Disable clang-format as it makes the huge conditions unreadable.
+// clang-format off
aheejin wrote:
If the point is making indentations correct, why disable clang-format?
https://github.com/llvm/llvm-p
aheejin wrote:
I'm not sure if I understand why this is necessary.
> This is a setjmp-like API that catches JavaScript errors. Its signature is
> `externref_t __builtin_wasm_js_catch(int *status);` The first time it
> returns, the return value is `null` and *status is set to 0. If we later cal
https://github.com/aheejin edited
https://github.com/llvm/llvm-project/pull/156087
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -199,6 +199,7 @@ class Triple {
SUSE,
OpenEmbedded,
Intel,
+WALI,
aheejin wrote:
It being a vendor seems weird because the current list of vendors basically
only include companies.
> think to minimize `cfg` changes and have quick support t
301 - 355 of 355 matches
Mail list logo