[clang] [llvm] [WebAssembly] Refactor Wasm Reference Types as TargetExtType (PR #93428)

2024-05-26 Thread Paulo Matos via cfe-commits
pmatos wrote: > This is a re-application of #71540, with the hopes I can get some help from > @pmatos and others to finish it. Right now the > '../clang/test/CodeGen/WebAssembly/wasm-funcref.c' test fails with an > assertion trying to cast the target("wasm.funcref") instruction to a pointer.

[jira] [Comment Edited] (GUACAMOLE-288) Add support for multi-monitor connections

2024-02-22 Thread Paulo Matos (Jira)
[ https://issues.apache.org/jira/browse/GUACAMOLE-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17819517#comment-17819517 ] Paulo Matos edited comment on GUACAMOLE-288 at 2/22/24 8:2

[jira] [Commented] (GUACAMOLE-288) Add support for multi-monitor connections

2024-02-22 Thread Paulo Matos (Jira)
[ https://issues.apache.org/jira/browse/GUACAMOLE-288?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17819517#comment-17819517 ] Paulo Matos commented on GUACAMOLE-288: --- Hi! Any development on this t

[clang] [llvm] [WebAssembly] Refactor Wasm Reference Types as TargetExtType (PR #71540)

2023-11-17 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71540 >From 31adeded0d1767e1ce43fbfcba5fe72c4e34121d Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Tue, 7 Nov 2023 08:28:36 +0100 Subject: [PATCH 1/4] [WebAssembly] Refactor Wasm Reference Types as TargetExtT

[clang] [llvm] [WebAssembly] Refactor Wasm Reference Types as TargetExtType (PR #71540)

2023-11-07 Thread Paulo Matos via cfe-commits
pmatos wrote: > Very cool! LGTM so far. It's really nice that we can delete that entire pass > out of the backend. Where can I read more about these new target extension > types? There's not a lot but there's something here: https://llvm.org/docs/LangRef.html#target-extension-type and of cour

[Lldb-commits] [lldb] [lldb] Fix calls to Type::getInt8PtrTy (PR #71561)

2023-11-07 Thread Paulo Matos via lldb-commits
https://github.com/pmatos closed https://github.com/llvm/llvm-project/pull/71561 ___ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

[Lldb-commits] [lldb] [lldb] Fix calls to Type::getInt8PtrTy (PR #71561)

2023-11-07 Thread Paulo Matos via lldb-commits
pmatos wrote: > LGTM. BTW, I found other uses of `Type::getInt8PtrTy` in > `llvm-project/llvm/include/llvm/ProfileData/InstrProfData.inc` and > `llvm-project/compiler-rt/include/profile/InstrProfData.inc`. Thanks, will fix those separately. Lets get lldb to build. https://github.com/llvm/llvm

[polly] [llvm] [mlir] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-07 Thread Paulo Matos via cfe-commits
pmatos wrote: > Please also update existing uses in `lldb`. Buildbot failure: > https://lab.llvm.org/buildbot/#/builders/68/builds/63101 Please see https://github.com/llvm/llvm-project/pull/71561 https://github.com/llvm/llvm-project/pull/71029 ___ cf

[Lldb-commits] [lldb] [lldb] Fix calls to Type::getInt8PtrTy (PR #71561)

2023-11-07 Thread Paulo Matos via lldb-commits
https://github.com/pmatos created https://github.com/llvm/llvm-project/pull/71561 These have been removed in 7b9d73c2f90c0ed8497339a16fc39785349d9610. This is a followup patch to apply the changes to lldb. >From 7971aa9ebf887eefb5bfd67f78319b0811be Mon Sep 17 00:00:00 2001 From: Pa

[clang] [llvm] [polly] [mlir] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-07 Thread Paulo Matos via cfe-commits
https://github.com/pmatos closed https://github.com/llvm/llvm-project/pull/71029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[mlir] [polly] [llvm] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-07 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71029 >From 0c939b18d795e2729dde8d5e0a4ee8fa6be145c7 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Fri, 3 Nov 2023 12:03:07 +0100 Subject: [PATCH] [NFC] Remove Type::getInt8PtrTy Replace this with PointerT

[clang] [llvm] [WebAssembly] Refactor Wasm Reference Types as TargetExtType (PR #71540)

2023-11-07 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71540 >From dfe73198afa1e18fc37b5d21a6a8e6e1e3261f88 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Tue, 7 Nov 2023 08:28:36 +0100 Subject: [PATCH 1/2] [WebAssembly] Refactor Wasm Reference Types as TargetExtT

[clang] [llvm] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

2023-11-07 Thread Paulo Matos via cfe-commits
pmatos wrote: Closing this as #71540 will implement the refactoring I mentioned earlier. Thank you for everyone's time commenting on this PR. https://github.com/llvm/llvm-project/pull/71069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https

[llvm] [clang] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

2023-11-07 Thread Paulo Matos via cfe-commits
https://github.com/pmatos closed https://github.com/llvm/llvm-project/pull/71069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [WebAssembly] Refactor Wasm Reference Types as TargetExtType (PR #71540)

2023-11-07 Thread Paulo Matos via cfe-commits
https://github.com/pmatos edited https://github.com/llvm/llvm-project/pull/71540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [WebAssembly] Refactor Wasm Reference Types as TargetExtType (PR #71540)

2023-11-07 Thread Paulo Matos via cfe-commits
https://github.com/pmatos edited https://github.com/llvm/llvm-project/pull/71540 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [WebAssembly] Refactor Wasm Reference Types as TargetExtType (PR #71540)

2023-11-07 Thread Paulo Matos via cfe-commits
pmatos wrote: The current patch implements successfully all the refactoring needed for externref. I will work on funcref next. This refactoring was triggered by the discussion at #71069 . Also the issue #71388 is currently blocking this. I include a workaround in the current patch. https://gi

[llvm] [clang] [WebAssembly] Refactor Wasm Reference Types as TargetExtType (PR #71540)

2023-11-07 Thread Paulo Matos via cfe-commits
wasm reftypes as pointers and just uses target extension types to represent them. >From dfe73198afa1e18fc37b5d21a6a8e6e1e3261f88 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Tue, 7 Nov 2023 08:28:36 +0100 Subject: [PATCH] [WebAssembly] Refactor Wasm Reference Types as TargetExtType Origina

[clang] [polly] [llvm] [mlir] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-07 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71029 >From fe3ed6bcc6eface6e7bfa3e9b043f8287dd129b0 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Fri, 3 Nov 2023 12:03:07 +0100 Subject: [PATCH 1/4] [NFC] Remove Type::getInt8PtrTy Replace this with PointerT

[llvm] [polly] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-06 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71029 >From fe3ed6bcc6eface6e7bfa3e9b043f8287dd129b0 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Fri, 3 Nov 2023 12:03:07 +0100 Subject: [PATCH 1/3] [NFC] Remove Type::getInt8PtrTy Replace this with PointerT

[llvm] [polly] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-06 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71029 >From fe3ed6bcc6eface6e7bfa3e9b043f8287dd129b0 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Fri, 3 Nov 2023 12:03:07 +0100 Subject: [PATCH 1/2] [NFC] Remove Type::getInt8PtrTy Replace this with PointerT

[llvm] [polly] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-06 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71029 >From fe3ed6bcc6eface6e7bfa3e9b043f8287dd129b0 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Fri, 3 Nov 2023 12:03:07 +0100 Subject: [PATCH] [NFC] Remove Type::getInt8PtrTy Replace this with PointerT

[clang] [llvm] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

2023-11-06 Thread Paulo Matos via cfe-commits
pmatos wrote: I am now investigating the use of TargetExtTypes to represent Wasm Reference Types. https://github.com/llvm/llvm-project/pull/71069 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/c

[clang] [llvm] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-06 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71029 >From bb652ca71a8f7ff5c362fef2fdf2d265fa77e45e Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Fri, 3 Nov 2023 12:03:07 +0100 Subject: [PATCH 1/2] [NFC] Remove Type::getInt8PtrTy Replace this with PointerT

[clang] [llvm] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-06 Thread Paulo Matos via cfe-commits
@@ -1514,7 +1514,7 @@ static void CreateGCRelocates(ArrayRef LiveVariables, auto getGCRelocateDecl = [&](Type *Ty) { assert(isHandledGCPointerType(Ty, GC)); auto AS = Ty->getScalarType()->getPointerAddressSpace(); -Type *NewTy = Type::getInt8PtrTy(M->getContext()

[llvm] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-03 Thread Paulo Matos via cfe-commits
pmatos wrote: I pushed forced a change using PointerType::getUnqual. Would this be more acceptable? It certainly looks cleaner to my eyes than having `PointerType::get(Ctx, 0)` everywhere. https://github.com/llvm/llvm-project/pull/71029 ___ cfe-commi

[llvm] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-03 Thread Paulo Matos via cfe-commits
https://github.com/pmatos updated https://github.com/llvm/llvm-project/pull/71029 >From bb652ca71a8f7ff5c362fef2fdf2d265fa77e45e Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Fri, 3 Nov 2023 12:03:07 +0100 Subject: [PATCH] [NFC] Remove Type::getInt8PtrTy Replace this with PointerT

[llvm] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-03 Thread Paulo Matos via cfe-commits
pmatos wrote: > I have a similar concern with @arsenm about making the default address space > 0. Can't we just use the already existing `PointerType::getUnqual()`, instead > of introducing the default address space 0? True, we could indeed just call `PointerType::getUnqual()` instead of just

[llvm] [clang] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

2023-11-03 Thread Paulo Matos via cfe-commits
pmatos wrote: > @pmatos If you don't want to go all the way to target extension types, is it > possible to gracefully handle this in wasm's TTI cost model? Return an > invalid or very high cost in this case? Unfortunately that actually doesn't work. We never get to the point of calculating a

[clang] [llvm] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

2023-11-02 Thread Paulo Matos via cfe-commits
https://github.com/pmatos created https://github.com/llvm/llvm-project/pull/71069 Fixes #69894 . >From deb62d806b4bba983d771eb87c3188a3fc3d56d5 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Tue, 31 Oct 2023 09:01:25 +0100 Subject: [PATCH 1/2] [WebAssembly] Reftypes are not valid elem

[llvm] [clang] [WebAssembly] Mark externref as not being valid vector elements (PR #71069)

2023-11-02 Thread Paulo Matos via cfe-commits
pmatos wrote: cc: @nikic @jcranmer-intel @tlively @asb I am looking for suggestions for a way forward on this. Issue #69894 triggers the SLPVectorizer that tries to create a vector of 2 externref and calculate its cost. Externref is a WebAssembly type currently represented as a pointer to a

[clang] [llvm] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Paulo Matos via cfe-commits
https://github.com/pmatos edited https://github.com/llvm/llvm-project/pull/71029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Paulo Matos via cfe-commits
pmatos wrote: > Nit: can you add in the description that this is a follow-up from the opaque > pointer transition (having an explicit motivation helps read a patch). Thanks! you're right. done. https://github.com/llvm/llvm-project/pull/71029 ___ cfe-

[clang] [llvm] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Paulo Matos via cfe-commits
pmatos wrote: > I still think all the defaulted address space parameters should be purged and > it only invites bugs. It's a regression to introduce a new defaulted argument. Understandable, although always writing `PointerType::get(Ctx, 0);` really looks weird given most of the time the secon

[llvm] [clang] [NFC] Remove Type::getInt8PtrTy (PR #71029)

2023-11-02 Thread Paulo Matos via cfe-commits
https://github.com/pmatos created https://github.com/llvm/llvm-project/pull/71029 Replace this with PointerType::get(). Also adds AS = 0 as an optional argument to get() methods. >From 28745bc7877747f998f658ee2f661f8312c54814 Mon Sep 17 00:00:00 2001 From: Paulo Matos Date: Thu, 2 Nov 2023

[PATCH] D155978: [SPIRV] Add SPIR-V logical triple.

2023-08-11 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: llvm/include/llvm/TargetParser/Triple.h:106 +wasm32, // WebAssembly with 32-bit pointers +wasm64, // WebAssembly with 64-bit pointers renderscript32, // 32-bit RenderScript Keenuts wrote: > pmatos w

[PATCH] D155978: [SPIRV] Add SPIR-V logical triple.

2023-08-11 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added subscribers: iliya-diyachkov, zuban32. pmatos added a comment. Thanks for the patch. Left a few comments. Others can take a better look, I am sure. Maybe @iliya-diyachkov or @zuban32 can take a look as well. Comment at: llvm/include/llvm/TargetParser/Triple.h:106

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-06-10 Thread Paulo Matos via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG55aeb23fe008: [clang][WebAssembly] Implement support for table types and builtins (authored by pmatos). Changed prior to commit: https://reviews.l

[clang] 55aeb23 - [clang][WebAssembly] Implement support for table types and builtins

2023-06-10 Thread Paulo Matos via cfe-commits
Author: Paulo Matos Date: 2023-06-10T15:53:13+02:00 New Revision: 55aeb23fe0084d930ecd7335092d712bd71694c7 URL: https://github.com/llvm/llvm-project/commit/55aeb23fe0084d930ecd7335092d712bd71694c7 DIFF: https://github.com/llvm/llvm-project/commit/55aeb23fe0084d930ecd7335092d712bd71694c7.diff

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-06-10 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D139010#4400303 , @aaron.ballman wrote: > Spotted a typo in the docs, but otherwise LGTM (thanks for your patience > while I was out last week). Thanks for your time one this. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D152126: [WebAssembly] Add tests ensuring rotates persist

2023-06-05 Thread Paulo Matos via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9571a28ee4e8: [WebAssembly] Add tests ensuring rotates persist (authored by pmatos). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D152126/new/ https://revie

[clang] 9571a28 - [WebAssembly] Add tests ensuring rotates persist

2023-06-05 Thread Paulo Matos via cfe-commits
Author: Paulo Matos Date: 2023-06-06T07:48:35+02:00 New Revision: 9571a28ee4e801a7796569d62fe037fc22cd65a4 URL: https://github.com/llvm/llvm-project/commit/9571a28ee4e801a7796569d62fe037fc22cd65a4 DIFF: https://github.com/llvm/llvm-project/commit/9571a28ee4e801a7796569d62fe037fc22cd65a4.diff

[PATCH] D152126: [WebAssembly] Add tests ensuring rotates persist

2023-06-05 Thread Paulo Matos via Phabricator via cfe-commits
pmatos created this revision. pmatos added reviewers: dschuff, tlively. Herald added subscribers: asb, wingo, sunfish, jgravelle-google, sbc100. Herald added a project: All. pmatos requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, aheejin. Herald added projects

[PATCH] D150670: [InstCombine] Disable generation of fshl/fshr for rotates

2023-06-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. Landed, thanks for your patience. Lets hope it sticks. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150670/new/ https://reviews.llvm.org/D150670 ___ cfe-commits mailing list cfe-

[PATCH] D150670: [InstCombine] Disable generation of fshl/fshr for rotates

2023-06-01 Thread Paulo Matos via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG9485d983ac0c: [InstCombine] Disable generation of fshl/fshr for rotates (authored by pmatos). Changed prior to commit: https://reviews.llvm.org/D150670?vs=527326&id=527395#toc Repository: rG LLVM Git

[PATCH] D150670: [InstCombine] Disable generation of fshl/fshr for rotates

2023-06-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D150670#4383823 , @nikic wrote: > Can you please drop all wasm related tests and instead add an InstCombine > test for the fsh+and pattern? > > It would also be good to have a test where we can fold one side to a > constant, b

[PATCH] D150670: [InstCombine] Disable generation of fshl/fshr for rotates

2023-06-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 527326. pmatos added a comment. Simplify code according to @nikic suggestion. Add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150670/new/ https://reviews.llvm.org/D150670 Files: llvm/lib/Transforms/I

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 526578. pmatos added a comment. Apply clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/docs/LanguageExtensions.rst clang/include/clang/AS

[PATCH] D150670: Disable generation of fshl/fshr for rotates

2023-05-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 526577. pmatos added a comment. Apply clang-format. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150670/new/ https://reviews.llvm.org/D150670 Files: clang/test/CodeGen/WebAssembly/wasm-rotate.c llvm/lib/Tr

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 526559. pmatos added a comment. Fix up some spacing issues. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150670/new/ https://reviews.llvm.org/D150670 Files: clang/test/CodeGen/WebAssembly/wasm-rotate.c llv

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 526556. pmatos added a comment. Implement optimization when demanded bits are known, skip otherwise for rotates. @nikic Things look much better now. Thanks for your help with the changes in InstCombine. What do you think? Repository: rG LLVM Github Monore

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 526539. pmatos added a comment. Remove test portion attempting to test coroutines. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/docs/LanguageExtensio

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-29 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 526436. pmatos marked an inline comment as done. pmatos added a comment. Address the comments wrt the documentation. Added link to Wasm spec. @aaron.ballman What do you think? I added the reference to the top level of the WebAssembly section, rather than to t

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-29 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 3 inline comments as done. pmatos added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2288 +argument is the index to which to store the value into, and the +third argument is a value of reference type to store in the table. +It returns nothing.

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-29 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: llvm/test/Transforms/InstCombine/fsh.ll:664 +; CHECK-NEXT:[[T1:%.*]] = and i32 [[A:%.*]], -65536 +; CHECK-NEXT:[[T2:%.*]] = call i32 @llvm.fshl.i32(i32 [[T1]], i32 [[T1]], i32 16) ; CHECK-NEXT:ret i32 [[T2]]

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-26 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: llvm/test/Transforms/InstCombine/fsh.ll:664 +; CHECK-NEXT:[[T1:%.*]] = and i32 [[A:%.*]], -65536 +; CHECK-NEXT:[[T2:%.*]] = call i32 @llvm.fshl.i32(i32 [[T1]], i32 [[T1]], i32 16) ; CHECK-NEXT:ret i32 [[T2]]

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-26 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 526044. pmatos added a comment. Update the patch by removing target specific changes in CGBuiltin. Leave fshl/fshr unchanged for rotates. This actually fixes a todo in fshl/r test. @nikic What do you think of the current patch? Repository: rG LLVM Github

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-24 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D150670#4368238 , @pmatos wrote: > In D150670#4352163 , @nikic wrote: > >> 1. Say that we prefer preserving rotates over "simplifying" funnel shifts >> (ending up with the rot2 pattern)

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-24 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D150670#4352163 , @nikic wrote: > 1. Say that we prefer preserving rotates over "simplifying" funnel shifts > (ending up with the rot2 pattern). Basically by skipping the optimization at > https://github.com/llvm/llvm-project/

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-24 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D150670#4352094 , @craig.topper wrote: >> Preventing the simplification means adding target specific code in >> instcombine which seems even worse than adding it here given as @dschuff >> pointed out, there's precedent with x

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-23 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: clang/docs/LanguageExtensions.rst:2288 +argument is the index to which to store the value into, and the +third argument is a value of reference type to store in the table. +It returns nothing. aaron.ballman wrote: > This

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-23 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 524710. pmatos marked 8 inline comments as done. pmatos added a comment. Address remaining comments. Make table.size builtin return size_t. Still remaining to be address is co_return on tables. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTIO

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-19 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D139010#4350869 , @tlively wrote: > It looks like the LLVM-side changes are generally moving Wasm type > classification functions to a more global location. Since no other backend > should care about these things, it would be

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-19 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 523741. pmatos added a comment. Remove modifications from Type.h and move them to WebAssembly files. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/doc

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-19 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. @nikic Thank you for the thorough suggestions above. I will have to look at this closer next week and will work on an alternative solution. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150670/new/ https://reviews.llvm.org/

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-18 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D150670#4351147 , @nikic wrote: > Lowering to a rotate intrinsic only "solves" this for wasm and will at the > same time make these rotates completely opaque to optimization -- heck, it > looks like we don't even support const

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-17 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D150670#4351147 , @nikic wrote: > This doesn't looks like a wasm specific problem. You get essentially the same > issue on any target that has a rotate instruction but no funnel shift > instruction. Here are just a couple exam

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-17 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. Ready for review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150670/new/ https://reviews.llvm.org/D150670 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-17 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 523149. pmatos added a comment. Generate rotates for 64bits as well. Add tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150670/new/ https://reviews.llvm.org/D150670 Files: clang/lib/CodeGen/CGBuiltin.cp

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-17 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D150670#4347150 , @dschuff wrote: > FWIW X86 seems to do something similar elsewhere in this file > (https://github.com/llvm/llvm-project/blob/main/clang/lib/CodeGen/CGBuiltin.cpp#L985-L986), > although it doesn't seem common

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-16 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a reviewer: spatel. pmatos added a comment. Herald added a subscriber: StephenFan. Adding Sanjay as a reviewer since he implemented the clang emitRotate which we patched. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D150670/new/ https

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-16 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. Proposal to fix https://github.com/llvm/llvm-project/issues/62703 This not ready to land yet but it should open a discussion on if this is a good fix for this issue. If we want to go this route we need: support for 64bits, tests. A quick summary of why this is needed. Th

[PATCH] D150670: [WebAssembly] Disable generation of fshl/fshr for rotates

2023-05-16 Thread Paulo Matos via Phabricator via cfe-commits
pmatos created this revision. pmatos added reviewers: dschuff, tlively. Herald added subscribers: asb, wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100. Herald added a project: All. pmatos requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, aheejin

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-05-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked an inline comment as done. pmatos added a comment. @tlively @aaron.ballman pinging both to get final reviews on the LLVM and Clang parts respectively. It would be great to have this merged soon. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llv

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-27 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked an inline comment as done. pmatos added a comment. I think we are almost there. @aaron.ballman what do you think? Comment at: clang/test/Sema/wasm-refs-and-tables.c:81 + + funcref_t func = __builtin_wasm_ref_null_func(0); // expected-error {{too many arguments t

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-27 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 517535. pmatos added a comment. Add documentation for table builtins. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/docs/LanguageExtensions.rst clan

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-27 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: clang/test/SemaCXX/wasm-refs-and-tables.cpp:35 +task<__externref_t[]> g() { + co_return table; +} @aaron.ballman I tried and failed to create a good testcase for co_return. However creating coroutines seems to be an std

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-27 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 517525. pmatos marked an inline comment as done. pmatos added a comment. Quick fixup of test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/docs/Langu

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-27 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked an inline comment as done. pmatos added inline comments. Comment at: clang/test/Sema/wasm-refs-and-tables.c:17 +static __externref_t t6[] = {0}; // expected-error {{only zero-length WebAssembly tables are currently supported}} +__externref_t t7[0]; // e

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-27 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 517521. pmatos marked 2 inline comments as done. pmatos added a comment. Update a few more tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/docs/L

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-27 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 2 inline comments as done. pmatos added inline comments. Comment at: clang/include/clang/Basic/BuiltinsWebAssembly.def:205-210 +TARGET_BUILTIN(__builtin_wasm_table_set, "viii", "t", "reference-types") +TARGET_BUILTIN(__builtin_wasm_table_get, "iii", "t", "referenc

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-27 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 517478. pmatos marked 6 inline comments as done. pmatos added a comment. Complete fixing tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/docs/Lan

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-26 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. Thanks for the comments - I am working on addressing these at the moment. The LLVM part of the patch is just some refactoring and therefore should be pretty trivial, pinging @tlively in case he has some time. Comment at: clang/test/Sema/wasm-refs-and-ta

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-26 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 517166. pmatos marked 3 inline comments as done. pmatos added a comment. Fix Wasm table tests. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/docs/Lang

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-04-21 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked an inline comment as done. pmatos added inline comments. Comment at: clang/test/Sema/builtins-wasm.c:12-13 + __builtin_wasm_table_size(table, table);// expected-error {{too many arguments to function call, expected 1, have 2}} + void *a = __builtin_wa

[clang] 481e202 - [clang][doc] Fix link to SYCL compiler design doc

2023-03-28 Thread Paulo Matos via cfe-commits
Author: Paulo Matos Date: 2023-03-28T18:09:52+02:00 New Revision: 481e20252461e730f36fb221123a853eda27cafc URL: https://github.com/llvm/llvm-project/commit/481e20252461e730f36fb221123a853eda27cafc DIFF: https://github.com/llvm/llvm-project/commit/481e20252461e730f36fb221123a853eda27cafc.diff

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-03-28 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. @aaron.ballman Any further comments on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 ___ cfe-commits mailing list cfe-commits@li

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-03-20 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: clang/test/SemaCXX/wasm-refs-and-tables.cpp:16-17 +__externref_t **t2; // expected-error {{pointer to WebAssembly reference type is not allowed}} +__externref_t **t3; // expected-error {{pointer to WebAssembly

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-03-20 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 506552. pmatos marked 4 inline comments as done. pmatos added a comment. Address concerns about table subscripting. Add warnings for that. Address a few other smaller comments like testing for table comparisons. Repository: rG LLVM Github Monorepo CHANGES

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-03-20 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 506521. pmatos added a comment. Remove references to table subscript. Simplify patch. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/include/clang/AST/

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-03-20 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 506499. pmatos added a comment. Rebase on main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/include/clang/AST/Expr.h clang/include/clang/AST/Type.

[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang

2023-03-17 Thread Paulo Matos via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG8d0c88975212: [clang][WebAssembly] Initial support for reference type funcref in clang (authored by pmatos). Changed prior to commit: https://revi

[clang] 8d0c889 - [clang][WebAssembly] Initial support for reference type funcref in clang

2023-03-17 Thread Paulo Matos via cfe-commits
Author: Paulo Matos Date: 2023-03-17T18:31:44+01:00 New Revision: 8d0c889752121e62e7258570c592b905f544d36f URL: https://github.com/llvm/llvm-project/commit/8d0c889752121e62e7258570c592b905f544d36f DIFF: https://github.com/llvm/llvm-project/commit/8d0c889752121e62e7258570c592b905f544d36f.diff

[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang

2023-03-17 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 3 inline comments as done. pmatos added a comment. Thanks all for the comments, fixed and will soon land after running a check-all. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.org/D128440 __

[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang

2023-03-08 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. @erichkeane @aaron.ballman any further comments on this? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.org/D128440 ___ cfe-commits mailing list cf

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-02-28 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 501143. pmatos marked an inline comment as done. pmatos added a comment. Address comments regarding tables and remove some unused code. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.l

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-02-28 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 3 inline comments as done. pmatos added inline comments. Comment at: clang/include/clang/AST/Stmt.h:456 - class ArrayOrMatrixSubscriptExprBitfields { + class AMTSubscriptExprBitfields { friend class ArraySubscriptExpr; aaron.ballman wrote:

[PATCH] D139010: [clang][WebAssembly] Implement support for table types and builtins

2023-02-28 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 501110. pmatos marked an inline comment as done. pmatos added a comment. Address the comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/include/c

[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang

2023-02-28 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 501081. pmatos added a comment. Add forgotten comment to test. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.org/D128440 Files: clang/include/clang/AST/DeclBase.h clang/incl

[PATCH] D128440: [WebAssembly] Initial support for reference type funcref in clang

2023-02-28 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 501075. pmatos marked 3 inline comments as done. pmatos added a comment. Patch with all outstanding comments addressed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.org/D128440

  1   2   3   4   5   6   7   8   9   10   >