[clang] [WebAssembly] Add error checking for -wasm-use-legacy-ch (PR #122526)

2025-01-10 Thread Heejin Ahn via 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

[clang] [WebAssembly] Refactor Wasm EH/SjLj error checking (PR #122466)

2025-01-10 Thread Heejin Ahn via cfe-commits
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

[clang] [WebAssembly] Refactor Wasm EH/SjLj error checking (PR #122466)

2025-01-10 Thread Heejin Ahn via 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'

[clang] [WebAssembly] Refactor Wasm EH/SjLj error checking (PR #122466)

2025-01-10 Thread Heejin Ahn via cfe-commits
@@ -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

[clang] [WebAssembly] Refactor Wasm EH/SjLj error checking (PR #122466)

2025-01-10 Thread Heejin Ahn via 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'

[clang] [WebAssembly] Refactor Wasm EH/SjLj error checking (PR #122466)

2025-01-10 Thread Heejin Ahn via cfe-commits
@@ -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

[clang] [WebAssembly] Refactor Wasm EH/SjLj error checking (PR #122466)

2025-01-10 Thread Heejin Ahn via cfe-commits
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

[clang] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

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

[clang] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-12-02 Thread Heejin Ahn via cfe-commits
@@ -127,6 +127,13 @@ def : ProcessorModel<"generic", NoSchedModel, FeatureMutableGlobals, FeatureNontrappingFPToInt, FeatureReferenceTypes, FeatureSignExt]>; +// Lime1:

[clang] [llvm] [WebAssembly] Support the new "Lime1" CPU (PR #112035)

2024-12-02 Thread Heejin Ahn via cfe-commits
@@ -167,6 +167,17 @@ bool WebAssemblyTargetInfo::initFeatureMap( Features["reference-types"] = true; Features["sign-ext"] = true; }; + auto addLime1Features = [&]() { +// Lime1: +// +

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-12-02 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. 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

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
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

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
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

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -103,6 +106,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo { bool hasMutableGlobals() const { return HasMutableGlobals; } bool hasNontrappingFPToInt() const { return HasNontrappingFPToInt; } bool hasReferenceTypes() const { return HasRefere

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -1,7 +1,7 @@ -; RUN: llc < %s -asm-verbose=false -verify-machineinstrs -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -mcpu=mvp -mattr=+bulk-memory | FileCheck %s --check-prefixes CHECK,BULK-MEM -; RUN: llc < %s -asm-verbose=false -ve

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -255,10 +255,11 @@ static void setRelocs(const std::vector &chunks, } } -// An object file can have two approaches to tables. With the reference-types -// feature enabled, input files that define or use tables declare the tables -// using symbols, and record each use wit

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -49,6 +50,7 @@ class WebAssemblySubtarget final : public WebAssemblyGenSubtargetInfo { bool HasMutableGlobals = false; bool HasNontrappingFPToInt = false; bool HasReferenceTypes = false; + bool HasCallIndirectOverlong = false; aheejin wrote: Nit: Th

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -63,6 +67,10 @@ def FeatureReferenceTypes : SubtargetFeature<"reference-types", "HasReferenceTypes", "true", "Enable reference types">; +def FeatureCallIndirectOverlong : aheejin wrote: Nit: This can go after `FeatureBulkMemory

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -326,7 +326,7 @@ void TableSection::addTable(InputTable *table) { // to assign table number 0 to the indirect function table. for (const auto *culprit : out.importSec->importedSymbols) { if (isa(culprit)) { - error("object file not built with 're

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -63,6 +64,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo { bool HasMutableGlobals = false; bool HasNontrappingFPToInt = false; bool HasReferenceTypes = false; + bool HasCallIndirectOverlong = false; aheejin wrote: Nit:

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -68,6 +72,10 @@ def HasReferenceTypes : Predicate<"Subtarget->hasReferenceTypes()">, AssemblerPredicate<(all_of FeatureReferenceTypes), "reference-types">; +def HasCallIndirectOverlong : aheejin wrote: Nit: This can go after `HasBulkMemoryOpt` for

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -284,7 +285,7 @@ void ObjFile::addLegacyIndirectFunctionTableIfNeeded( return; // It's possible for an input to define tables and also use the indirect - // function table, but forget to compile with -mattr=+reference-types. + // function table, but forget to compil

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -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

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via 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

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -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

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -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

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via 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

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -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_

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -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

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
@@ -265,6 +279,14 @@ bool WebAssemblyTargetInfo::handleTargetFeatures( HasReferenceTypes = false; continue; } +if (Feature == "+call-indirect-overlong") { + HasCallIndirectOverlong = true; + continue; +} +if (Feature == "-call-indirect-over

[clang] [lld] [llvm] [WebAssembly] Define call-indirect-overlong and bulk-memory-opt features (PR #117087)

2024-11-21 Thread Heejin Ahn via cfe-commits
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

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-16 Thread Heejin Ahn via cfe-commits
aheejin wrote: > I've now added a patch which fixes #63755. Can you split this patch into a separate PR? https://github.com/llvm/llvm-project/pull/112049 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/li

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. This LGTM, but I guess we need to wait until Emscripten disables them by default, because there are some failing Emscripten tests and Binaryen doesn't yet have lowering passes for these. I don't think we need to block this on all these; we

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
@@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj %s -o %t.o +; RUN: llc -filetype=obj -mattr=-bulk-memory %s -o %t.o aheejin wrote: Thanks for the explanation! https://github.com/llvm/llvm-project/pull/112049 ___ cfe-commits

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
@@ -1,4 +1,4 @@ -; RUN: llc -filetype=obj %s -o %t.o +; RUN: llc -filetype=obj -mattr=-bulk-memory %s -o %t.o aheejin wrote: Why do we need to disable bulk memory here and in many other files? https://github.com/llvm/llvm-project/pull/112049

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
@@ -151,8 +151,10 @@ bool WebAssemblyTargetInfo::initFeatureMap( llvm::StringMap &Features, DiagnosticsEngine &Diags, StringRef CPU, const std::vector &FeaturesVec) const { auto addGenericFeatures = [&]() { +Features["bulk-memory"] = true; aheejin

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
@@ -166,6 +166,8 @@ // GENERIC-INCLUDE-DAG: #define __wasm_mutable_globals__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_reference_types__ 1{{$}} // GENERIC-INCLUDE-DAG: #define __wasm_sign_ext__ 1{{$}} +// GENERIC-INCLUDE-DAG: #define __wasm_nontrapping_fptoint__ 1{{$}} +//

[clang] [lld] [llvm] [WebAssembly] Enable nontrapping-fptoint and bulk-memory by default. (PR #112049)

2024-10-15 Thread Heejin Ahn via cfe-commits
@@ -1,9 +1,9 @@ ; REQUIRES: asserts -; RUN: llc < %s -disable-wasm-fallthrough-return-opt -wasm-disable-explicit-locals -wasm-keep-registers -disable-block-placement -verify-machineinstrs -fast-isel=false -machine-sink-split-probability-threshold=0 -cgp-freq-ratio-to-skip-merg

[clang] 3b96294 - [WebAssembly] Update type checker message in notypecheck.s

2024-09-26 Thread Heejin Ahn via cfe-commits
Author: Heejin Ahn Date: 2024-09-27T01:59:36Z New Revision: 3b96294f2d3dd5d9646803c7c4e35039a373792e URL: https://github.com/llvm/llvm-project/commit/3b96294f2d3dd5d9646803c7c4e35039a373792e DIFF: https://github.com/llvm/llvm-project/commit/3b96294f2d3dd5d9646803c7c4e35039a373792e.diff LOG: [W

[clang] [llvm] [WebAssembly] Add intrinsics to wasm_simd128.h for all FP16 instructions (PR #106465)

2024-08-29 Thread Heejin Ahn via cfe-commits
aheejin wrote: Looks good to me, but I'm not an expert here.. Maybe @tlively can take a look? https://github.com/llvm/llvm-project/pull/106465 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

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

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-21 Thread Heejin Ahn via cfe-commits
aheejin wrote: > I know it is a little pedantic, but I recently sorted the features > alphabetically (#90777)... Can you move the new `fp16` entries so that the > lists are alphabetically sorted in the files? Sorry nevermind, even if we want to sort it its place is the same... 😅 https://githu

[clang] [llvm] [WebAssembly] Change half-precision feature name to fp16. (PR #105434)

2024-08-20 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: I know it is a little pedantic, but I recently sorted the features alphabetically (#90777)... Can you move the new `fp16` entries so that the lists are alphabetically sorted in the files? https://github.com/llvm/llvm-project/pull/105434 ___

[clang] [llvm] [WebAssembly] Implement f16x8.replace_lane instruction. (PR #99388)

2024-07-19 Thread Heejin Ahn via cfe-commits
@@ -702,6 +702,19 @@ defm "" : ReplaceLane; defm "" : ReplaceLane; defm "" : ReplaceLane; +// For now use an instrinsic for f16x8.replace_lane instead of ReplaceLane above +// since LL generated with half type arguments is not well supported and creates ahee

[clang] [llvm] [WebAssembly] Implement f16x8.replace_lane instruction. (PR #99388)

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

[clang] [llvm] [WebAssembly] support getVT from `externref` and `funcref` (PR #97080)

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

[clang] [llvm] [WebAssembly] support getVT from `externref` and `funcref` (PR #97080)

2024-06-28 Thread Heejin Ahn via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -O2 -triple wasm32-unknown-unknown-wasm -target-feature +reference-types -emit-llvm -o - %s | FileCheck %s aheejin wrote: ```suggestion // RUN: %clang_cc1 -O2 -triple wasm32-unknown-unknown -target-feature +reference-types -

[clang] [llvm] [WebAssembly] support getVT from `externref` and `funcref` (PR #97080)

2024-06-28 Thread Heejin Ahn via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -O2 -triple wasm32-unknown-unknown-wasm -target-feature +reference-types -emit-llvm -o - %s | FileCheck %s aheejin wrote: By the way, this command succeeds even without this patch. The test should be something that fails now

[clang] [llvm] [WebAssembly] support getVT from `externref` and `funcref` (PR #97080)

2024-06-28 Thread Heejin Ahn via cfe-commits
@@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -O2 -triple wasm32-unknown-unknown-wasm -target-feature +reference-types -emit-llvm -o - %s | FileCheck %s + +// From issue 69894. Reftypes need to be marked as not valid as vector elements. aheejin wrote: If you would like

[clang] [llvm] [WebAssembly] support getVT from `externref` and `funcref` (PR #97080)

2024-06-28 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: What happens if you compile a file that really vectorizes reference types? The attached test doesn't seem to actually end up getting vectorized after all. Can you add a test that get vectorized? https://github.com/llvm/llvm-project/pull/97080 _

[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 m

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

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

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

2024-05-28 Thread Heejin Ahn via cfe-commits
@@ -152,6 +153,18 @@ def F64x2 : Vec { let prefix = "f64x2"; } +def F16x8 : Vec { + let vt = v8f16; + let int_vt = v8i16; + let lane_vt = f32; + let lane_rc = F32; + let lane_bits = 16; + let lane_idx = LaneIdx8; + let lane_load = int_wasm_loadf16_f32; + let splat = PatFrag<

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

2024-05-28 Thread Heejin Ahn via cfe-commits
@@ -1199,6 +1213,7 @@ def : Pat<(v2f64 (froundeven (v2f64 V128:$src))), (NEAREST_F64x2 V128:$src)>; multiclass SIMDBinaryFP baseInst> { defm "" : SIMDBinary; defm "" : SIMDBinary; + defm "" : SIMDBinary; aheejin wrote: I understand why it's added, and I

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

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

[clang] [llvm] [WebAssembly] Implement all f16x8 binary instructions. (PR #93360)

2024-05-28 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin commented: Now you have commit access! https://github.com/llvm/llvm-project/pull/93360 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Heejin Ahn via cfe-commits
aheejin wrote: I guess you've likely already found it but anyway it's here: https://llvm.org/docs/DeveloperPolicy.html#obtaining-commit-access It's basically "Email Chris". https://github.com/llvm/llvm-project/pull/93228 ___ cfe-commits mailing list c

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin closed https://github.com/llvm/llvm-project/pull/93228 ___ 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 u

[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 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

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

2024-05-23 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/93261 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. >From

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

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

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin approved this pull request. LGTM % `!HasHalfPrecision` thing By the way I guess you can try getting a commit access soon? I think it is still "Send an an email to Chris" though... https://github.com/llvm/llvm-project/pull/93228 ___

[clang] [llvm] [WebAssembly] Implement prototype f16x8.splat instruction. (PR #93228)

2024-05-23 Thread Heejin Ahn via cfe-commits
@@ -90,6 +90,7 @@ class LLVM_LIBRARY_VISIBILITY WebAssemblyTargetInfo : public TargetInfo { StringRef getABI() const override; bool setABI(const std::string &Name) override; + bool useFP16ConversionIntrinsics() const override { return false; } aheejin wr

[libcxxabi] [libunwind] [WebAssembly] __USING_WASM_EXCEPTIONS__ -> __WASM_EXCEPTIONS__ (PR #92840)

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

[libcxxabi] [libunwind] [WebAssembly] __USING_WASM_EXCEPTIONS__ -> __WASM_EXCEPTIONS__ (PR #92840)

2024-05-21 Thread Heejin Ahn via cfe-commits
aheejin wrote: The other CI failure doesn't seem to be related. Merging. https://github.com/llvm/llvm-project/pull/92840 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxxabi] [libunwind] [WebAssembly] __USING_WASM_EXCEPTIONS__ -> __WASM_EXCEPTIONS__ (PR #92840)

2024-05-21 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/92840 >From e04e685a8fbf3e7915a9eaff3798fe77d15aab0c Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Sat, 18 May 2024 01:55:29 + Subject: [PATCH] [WebAssembly] __USING_WASM_EXCEPTIONS__ -> __WASM_EXCEPTIONS__ We'

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

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

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-21 Thread Heejin Ahn via cfe-commits
aheejin wrote: I'd appreciate if someone LGTM this. Thanks! https://github.com/llvm/llvm-project/pull/92192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libcxxabi] [libunwind] [WebAssembly] __USING_WASM_EXCEPTIONS__ -> __WASM_EXCEPTIONS__ (PR #92840)

2024-05-21 Thread Heejin Ahn via cfe-commits
aheejin wrote: It is hard to fix the clang-format errors because the modified files generally don't conform to the clang-format style anyway, so clang-format my change currently affects hundreds of unrelated lines. ```console aheejin@aheejin:~/llvm-project/libunwind$ git clang-format main chang

[libcxxabi] [libunwind] [WebAssembly] __USING_WASM_EXCEPTIONS__ -> __WASM_EXCEPTIONS__ (PR #92840)

2024-05-20 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/92840 We've decided to change `__USING_WASM_EXCEPTIONS__` preprocessor to `__WASM_EXCEPTIONS__` given that it's more concise. >From e04e685a8fbf3e7915a9eaff3798fe77d15aab0c Mon Sep 17 00:00:00 2001 From: Heejin Ahn D

[clang] [WebAssembly] Define __WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

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

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-20 Thread Heejin Ahn via cfe-commits
@@ -20,7 +20,7 @@ .text #endif -#if !defined(__USING_SJLJ_EXCEPTIONS__) +#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__wasm__) aheejin wrote: Can I land this? Thank you for your review! https://github.com/llvm/llvm-project/pull/92192 __

[clang] [WebAssembly] Define __WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

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

[clang] [WebAssembly] Define __WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

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

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

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

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/92604 >From bedab4dc6edc3fd44d79c42d4fd62dc1a6937fb0 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 17 May 2024 20:41:21 + Subject: [PATCH 1/3] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-excep

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Heejin Ahn via cfe-commits
@@ -1006,6 +1006,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, else if (LangOpts.hasDWARFExceptions() && (TI.getTriple().isThumb() || TI.getTriple().isARM())) Builder.defineMacro("__ARM_DWARF_EH__"); + else if (LangOpts.hasWasmExceptions()

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

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

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Heejin Ahn via cfe-commits
@@ -1006,6 +1006,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, else if (LangOpts.hasDWARFExceptions() && (TI.getTriple().isThumb() || TI.getTriple().isARM())) Builder.defineMacro("__ARM_DWARF_EH__"); + else if (LangOpts.hasWasmExceptions()

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

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

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

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

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

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

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Heejin Ahn via cfe-commits
@@ -1006,6 +1006,8 @@ static void InitializePredefinedMacros(const TargetInfo &TI, else if (LangOpts.hasDWARFExceptions() && (TI.getTriple().isThumb() || TI.getTriple().isARM())) Builder.defineMacro("__ARM_DWARF_EH__"); + else if (LangOpts.hasWasmExceptions()

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/92604 >From bedab4dc6edc3fd44d79c42d4fd62dc1a6937fb0 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Fri, 17 May 2024 20:41:21 + Subject: [PATCH 1/2] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-excep

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin ready_for_review https://github.com/llvm/llvm-project/pull/92604 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [WebAssembly] Define __USING_WASM_EXCEPTIONS__ for -fwasm-exceptions (PR #92604)

2024-05-17 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/92604 When using other specific exception options in Clang, such as `-fseh-exceptions` or `-fsjlj-exceptions`, Clang defines a corresponding preprocessor such as `-D__USING_SJLJ_EXCEPTIONS__`. Emscripten does that in

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-17 Thread Heejin Ahn via cfe-commits
@@ -20,7 +20,7 @@ .text #endif -#if !defined(__USING_SJLJ_EXCEPTIONS__) +#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__wasm__) aheejin wrote: Removed the clang change and `LIBUNWIND_USES_WASM_EXCEPTIONS`. https://github.com/llvm/llvm-project/pull/9

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-17 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/92192 >From 95b9e56ac8bdd3b0bde08f63f64e35d47a61b784 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 14 May 2024 22:08:20 + Subject: [PATCH 1/4] [libunwind][WebAssembly] Make libunwind compilable This tries t

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-17 Thread Heejin Ahn via cfe-commits
@@ -20,7 +20,7 @@ .text #endif -#if !defined(__USING_SJLJ_EXCEPTIONS__) +#if !defined(__USING_SJLJ_EXCEPTIONS__) && !defined(__wasm__) aheejin wrote: `__wasm__` is defined whenever we compile the code to wasm, and `__USING_WASM_EXCEPTIONS__` is defined whe

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-17 Thread Heejin Ahn via cfe-commits
aheejin wrote: Can someone review this? https://github.com/llvm/llvm-project/pull/92192 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-15 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/92192 >From 95b9e56ac8bdd3b0bde08f63f64e35d47a61b784 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 14 May 2024 22:08:20 + Subject: [PATCH 1/3] [libunwind][WebAssembly] Make libunwind compilable This tries t

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

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

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

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

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-15 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/92192 >From 95b9e56ac8bdd3b0bde08f63f64e35d47a61b784 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 14 May 2024 22:08:20 + Subject: [PATCH 1/3] [libunwind][WebAssembly] Make libunwind compilable This tries t

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-14 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin updated https://github.com/llvm/llvm-project/pull/92192 >From 95b9e56ac8bdd3b0bde08f63f64e35d47a61b784 Mon Sep 17 00:00:00 2001 From: Heejin Ahn Date: Tue, 14 May 2024 22:08:20 + Subject: [PATCH 1/2] [libunwind][WebAssembly] Make libunwind compilable This tries t

[clang] [libunwind] [libunwind][WebAssembly] Make libunwind compilable (PR #92192)

2024-05-14 Thread Heejin Ahn via cfe-commits
https://github.com/aheejin created https://github.com/llvm/llvm-project/pull/92192 This tries to make Wasm compilable in LLVM tree with CMake for non-Emscripten platform. This - Adds `-D__USING_WASM_EXCEPTIONS__` when you compile with `-fwasm-exceptions` (like other EH options) in Clang - Exc

[clang] [llvm] [WebAssembly] Implement prototype f32.store_f16 instruction. (PR #91545)

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

  1   2   3   4   >