[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

[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

[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

[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

[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

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

2023-02-28 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 4 inline comments as done. pmatos added a comment. Thanks @aaron.ballman . I think I have now address all outstanding comments. Comment at: clang/include/clang/Basic/Attr.td:4129 + let Documentation = [WebAssemblyExportNameDocs]; + let Subjects = SubjectList<[Ty

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

2023-02-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 497633. pmatos added a comment. Rebased on current HEAD. 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/

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

2023-02-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 497632. pmatos added a comment. Rebased on current HEAD. 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/include/cl

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2023-02-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 497630. pmatos added a comment. Rebased against HEAD. Waiting for @vitalybuka go ahead to land. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 Files: clang/include/

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

2023-02-14 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 2 inline comments as done. pmatos added a comment. @aaron.ballman I have finished addressing all the concerns on this patch. Do you have any further comments? Comment at: clang/lib/Sema/SemaType.cpp:7289-7290 + QualType Pointee = Type->getPointeeType(); + Point

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

2023-02-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 2 inline comments as done. pmatos added inline comments. Comment at: clang/lib/Sema/SemaType.cpp:7269 + } + Attrs[NewAttrKind] = true; + aaron.ballman wrote: > aaron.ballman wrote: > > This seems like it's not used. > Still wondering about this Th

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

2023-02-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 497004. pmatos added a comment. Remove unnecessary code. 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/include/cl

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

2023-02-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 497002. pmatos marked 2 inline comments as done. pmatos added a comment. Further refinement of the patch with more diagnostics tested. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.ll

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

2023-02-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 4 inline comments as done. pmatos added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:6696 +bool Sema::BuiltinWasmRefNullFunc(CallExpr *TheCall) { + if (TheCall->getNumArgs() != 0) +return true; erichkeane wrote: > Does this diag

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

2023-02-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 496937. pmatos marked 5 inline comments as done. pmatos added a comment. Addressed a few comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.org/D128440 Files: clang/inclu

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

2023-02-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 6 inline comments as done. pmatos added inline comments. Comment at: clang/lib/Sema/SemaChecking.cpp:6552-6555 + // The call we get looks like + // CallExpr + // `- ImplicitCastExpr + // `- DeclRefExpr tlively wrote: > How do these parts corre

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

2023-02-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 493919. pmatos marked an inline comment as done. pmatos added a comment. Address some of the pending comments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.org/D128440 Files:

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

2023-02-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked an inline comment as done. pmatos added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4129 + let Documentation = [WebAssemblyExportNameDocs]; + let Subjects = SubjectList<[TypedefName], ErrorDiag>; +} aaron.ballman wrote: > erichk

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

2023-02-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 11 inline comments as done. pmatos added inline comments. Comment at: clang/lib/Basic/Targets/DirectX.h:45 3, // hlsl_groupshared +// Wasm address space values for this map are dummy +20, // wasm_funcref erichkeane wrote: > pmatos wrote

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2023-01-31 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 rGeb66833d1957: [clang][WebAssembly] Initial support for reference type externref in clang (authored by pmatos). Repository: rG LLVM Github Monorepo

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2023-01-31 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 493633. pmatos added a comment. Address last comment before landing. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 Files: clang/include/clang/AST/ASTContext.h cl

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

2023-01-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 493264. pmatos added a comment. Rebase on main and fix a test diagnostic expectation. 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] D128440: [WebAssembly] Initial support for reference type funcref in clang

2023-01-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 493251. pmatos added a comment. Rebase on main. 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/include/clang/AST/T

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2023-01-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 493226. pmatos added a comment. Rebase on main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 Files: clang/include/clang/AST/ASTContext.h clang/include/clang/AST

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

2023-01-24 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. @aaron.ballman Thanks for all the comments, I have now finished addressing those. What do you think of the current patch? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 _

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

2023-01-24 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 491790. pmatos added a comment. Add missing newline at end of file. 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/inc

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

2023-01-24 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked an inline comment as done. pmatos added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:11827 +def err_wasm_builtin_arg_must_be_integer_type : Error < + "%ordinal0 argument must be an integer">; } // end of sema component. ---

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

2023-01-24 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 491784. pmatos added a comment. Simplify and add tests for remaining diagnostics 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.

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

2023-01-24 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 491707. pmatos added a comment. Further tests for use of tables in conditional branches. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/include/clang/A

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

2023-01-23 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 491608. pmatos added a comment. Finish fixing tests after dianostic message changes 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/Ex

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

2023-01-23 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 491468. pmatos added a comment. Fix some tests whose diagnostics changed 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 clan

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

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

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

2023-01-23 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/DiagnosticSemaKinds.td:11797 +def err_typecheck_wasm_table_must_have_zero_length : Error< + "only zero-length WebAssembly tables are currently supported">; +def err_wasm_

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

2023-01-18 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 490208. pmatos added a comment. Remove some unnecessary diagnostics. 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/in

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

2023-01-18 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 5 inline comments as done. pmatos added inline comments. Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:2171-2176 def err_reference_bind_to_vector_element : Error< "%select{non-const|volatile}0 reference cannot bind to vector element">; def err_re

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

2023-01-16 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4129 + let Documentation = [WebAssemblyExportNameDocs]; + let Subjects = SubjectList<[TypedefName], ErrorDiag>; +} erichkeane wrote: > pmatos wrote: > > erichkeane wrote: > > > Note tha

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

2023-01-16 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 489552. pmatos added a comment. Add new Attr Subject Function Pointer for __funcref attribute. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.org/D128440 Files: clang/include/c

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2023-01-16 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. I feel like the latest patch addresses all concerns until now. What do you think? Comment at: clang/include/clang/Basic/WebAssemblyReferenceTypes.def:16 +// +// - Name is the name of the builtin type. MangledName is the mangled name. +// -

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2023-01-16 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 489520. pmatos marked 7 inline comments as done. pmatos added a comment. Rebase on main. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 Files: clang/include/clang/A

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

2023-01-16 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 489468. pmatos added a comment. Updating tests after some changes to previous diagnostics. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clang/include/clang

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

2023-01-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 489031. pmatos marked 2 inline comments as done. pmatos added a comment. Address a few comments, add new test for funcref keyword diagnostic. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://rev

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2023-01-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 489005. pmatos added a comment. Rename test that still had tables in its name. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 Files: clang/include/clang/AST/ASTCont

[PATCH] D122215: [WebAssembly] Initial support for reference type externref in clang

2023-01-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 488999. pmatos added a comment. Fix tests after changing name mangling and error messages. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 Files: clang/include/clang

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

2023-01-13 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 15 inline comments as done. pmatos added inline comments. Comment at: clang/include/clang/Basic/Attr.td:4129 + let Documentation = [WebAssemblyExportNameDocs]; + let Subjects = SubjectList<[TypedefName], ErrorDiag>; +} erichkeane wrote: > Note tha

  1   2   3   >