[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] 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 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] D122215: [WebAssembly] Initial support for reference type externref in clang

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 2 inline comments as done. pmatos added a comment. Addressed a few comments downstream. Will upload new patch next. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 __

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 488598. pmatos added a comment. Address a couple of comments by @aaron.ballman 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-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked 5 inline comments as done. pmatos added inline comments. Comment at: clang/lib/AST/ASTContext.cpp:4012-4018 + if (Target->getTriple().isWasm() && Target->hasFeature("reference-types")) { +#define WASM_REF_TYPE(Name, MangledName, Id, SingletonId, AS)

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 488609. pmatos marked an inline comment as done. pmatos added a comment. Deal with Itanium Mangle and assert false outside Wasm triple. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.l

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2480-2481 #include "clang/Basic/RISCVVTypes.def" +#define WASM_TYPE(Name, Id, SingletonId) case BuiltinType::Id: +#include "clang/Basic/WebAssemblyReferenceTypes.def" case BuiltinType::ShortAccum: ---

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked an inline comment as done. pmatos added inline comments. Comment at: clang/lib/CodeGen/CGDebugInfo.cpp:806-807 + SingletonId = \ + DBuilder.createForwardDecl(llvm::dwarf::DW_TAG_structure_type

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 488634. pmatos marked an inline comment as done. pmatos added a comment. Address all comments except a couple of issues related to ABI and mangling. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ http

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos marked an inline comment as done. pmatos added a comment. @aaron.ballman many thanks for the thorough reviews on the patches. Happy to see this moving in the right direction. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2480-2481 #include "clang/Basic/RISCVVTypes.def"

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 488645. pmatos added a comment. @aaron.ballman Added support for externref mangling in Microsoft. This follows the pattern implemented by OpenCL types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. In D128440#4047535 , @pmatos wrote: > @aaron.ballman Added support for externref mangling in Microsoft. This > follows the pattern implemented by OpenCL types. Wrong revision - sorry. Repository: rG LLVM Github Monorepo CHAN

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 488646. pmatos added a comment. Undo last patch. Submitted change to incorrect revision. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.org/D128440 Files: clang/include/clang/A

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 488648. pmatos added a comment. Now under the correct revision: @aaron.ballman Added support for externref mangling in Microsoft. This follows the pattern implemented by OpenCL types. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:/

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added inline comments. Comment at: clang/lib/AST/MicrosoftMangle.cpp:2479-2483 +#define WASM_REF_TYPE(InternalName, MangledName, Id, SingletonId, AS) \ + case BuiltinType::Id: \ +Out << "PA";

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

2023-01-12 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 41. pmatos added a comment. Update mangling for Microsoft. 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/in

[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

[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] 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] 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] 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] 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] 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] 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] 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] 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] 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-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-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 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 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] D122215: [WebAssembly] Initial support for reference type externref in clang

2022-06-15 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 437119. pmatos retitled this revision from "[WebAssembly] Initial support for reference types in clang" to "[WebAssembly] Initial support for reference type externref in clang". pmatos edited the summary of this revision. pmatos added a comment. Update revisi

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

2022-06-21 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 438622. pmatos added a comment. Incorporate @asb semantic restrictions patch. Generate test CHECK using update_cc_* script. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D12

[PATCH] D128282: [WebAssembly] Update test to run it in opaque pointers mode

2022-06-21 Thread Paulo Matos via Phabricator via cfe-commits
pmatos created this revision. pmatos added reviewers: asb, tlively. Herald added subscribers: StephenFan, wingo, ecnelises, sunfish, jgravelle-google, sbc100, dschuff. Herald added a project: All. pmatos requested review of this revision. Herald added subscribers: cfe-commits, aheejin. Herald adde

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

2022-06-21 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 438722. pmatos added a comment. rebase on top of D128282 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 Files: clang/include/clan

[PATCH] D128282: [WebAssembly] Update test to run it in opaque pointers mode

2022-06-23 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 439345. pmatos added a comment. Remove extraneous whitespace. Make equal CHECK lines use WEBASSEMBLY: Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128282/new/ https://reviews.llvm.org/D128282 Files: clang/te

[PATCH] D128282: [WebAssembly] Update test to run it in opaque pointers mode

2022-06-23 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 rG0fdfeb0847df: [WebAssembly] Update test to run it in opaque pointers mode (authored by pmatos). Repository: rG LLVM Github Monorepo CHANGES SINCE

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

2022-06-23 Thread Paulo Matos via Phabricator via cfe-commits
pmatos created this revision. pmatos added reviewers: asb, tlively. Herald added subscribers: mattd, gchakrabarti, asavonic, StephenFan, wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added a reviewer: aaron.ballman. Herald added a project: All. pmatos requested re

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

2022-06-23 Thread Paulo Matos via Phabricator via cfe-commits
pmatos planned changes to this revision. pmatos added a comment. Draft patch as some tests still fail. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.org/D128440 ___ cfe-c

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

2022-06-23 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 439383. pmatos added a comment. Remove conflict marker 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/ASTContext.h clang/include/cl

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

2022-05-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 432876. pmatos added a comment. Rebased the work on D126535 . Added support for funcrefs as return values. Still having problems with funcrefs as function arguments though. So, further work is required. Not ready for review.

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

2022-05-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos planned changes to this revision. pmatos added a comment. Still need to implement funcrefs support as function arguments. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.org/D122215 ___

[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] 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] D139010: [clang][WebAssembly] Implement support for table types and builtins

2022-11-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos created this revision. Herald added subscribers: wingo, ecnelises, sunfish, hiraditya, jgravelle-google, sbc100, dschuff. Herald added a reviewer: aaron.ballman. Herald added a project: All. pmatos requested review of this revision. Herald added subscribers: llvm-commits, cfe-commits, aheej

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

2022-11-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos planned changes to this revision. pmatos added a comment. Please wait to review until the RFC (coming soon) is published. 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

2022-11-30 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. Subsumes D124162 and D123510 . 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

2022-12-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 479265. pmatos added a comment. Remove unnecessary attribute that lingered around after some refactoring. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D139010/new/ https://reviews.llvm.org/D139010 Files: clan

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

2022-12-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos added a comment. This is ready for review. RFC has been published here: https://discourse.llvm.org/t/rfc-webassembly-reference-types-in-clang/66939 Thanks to @tlively and @asb for the reviews. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D

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

2022-12-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 479281. pmatos added a comment. Ready for review. RFC: https://discourse.llvm.org/t/rfc-webassembly-reference-types-in-clang/66939 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D122215/new/ https://reviews.llvm.

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

2022-12-01 Thread Paulo Matos via Phabricator via cfe-commits
pmatos updated this revision to Diff 479282. pmatos added a comment. Ready for review. RFC: https://discourse.llvm.org/t/rfc-webassembly-reference-types-in-clang/66939 Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D128440/new/ https://reviews.llvm.

[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-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] 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] 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 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-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] 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] 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 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] 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] 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 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] 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-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-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] 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] 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#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-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-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-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] 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] 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-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] 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] 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: 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] 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: [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] 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
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. 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] 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-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 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 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 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 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-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] 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-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] 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] 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] 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] 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 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-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

<    1   2   3   >