Page MenuHomePhabricator

pmatos (Paulo Matos)
User

Projects

User does not belong to any projects.

User Details

User Since
Oct 28 2016, 2:19 AM (242 w, 2 d)

Recent Activity

Thu, Jun 10

pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

Also affecting riscv-v (riscvv?) so I've reverted the change.

https://lab.llvm.org/buildbot/#/builders/67/builds/3087

Thu, Jun 10, 8:22 PM · Restricted Project, Restricted Project
pmatos committed rG31859f896cf9: Implementation of global.get/set for reftypes in LLVM IR (authored by pmatos).
Implementation of global.get/set for reftypes in LLVM IR
Thu, Jun 10, 1:08 AM
pmatos closed D95425: Implementation of global.get/set for reftypes in LLVM IR.
Thu, Jun 10, 1:08 AM · Restricted Project, Restricted Project

Tue, Jun 8

pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

Hopefully we are close to landing this. :)

Tue, Jun 8, 7:13 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Fix details requested by @tlively in latest comemnts.

Tue, Jun 8, 7:06 AM · Restricted Project, Restricted Project

Tue, Jun 1

pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

@tlively thanks for the comments. I am currently taking some time off but I will address your concerns upon my return.

Tue, Jun 1, 8:07 AM · Restricted Project, Restricted Project

May 19 2021

pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

@deadalnix @tlively @sbc100 anything missing here to get this landed?

May 19 2021, 5:01 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Rebase and update minor details and fix a few lint warnings...
Non-functional changes only.

May 19 2021, 5:00 AM · Restricted Project, Restricted Project

May 7 2021

pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Making the linter happy...

May 7 2021, 8:48 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.
  • Simplifies some of code in the middle-end.
  • Removes setComdat and adds setWeak
May 7 2021, 8:04 AM · Restricted Project, Restricted Project
pmatos added inline comments to D95425: Implementation of global.get/set for reftypes in LLVM IR.
May 7 2021, 7:28 AM · Restricted Project, Restricted Project

May 4 2021

pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Removed extraneous changes to previous patches

May 4 2021, 7:29 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Fix broken merge of table ins reordering commit

May 4 2021, 6:55 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Fix patch set... again!

May 4 2021, 6:11 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Fix patch submitted to phab...

May 4 2021, 5:58 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Rebase this on D101608 from @wingo and clear table slot after call

May 4 2021, 5:40 AM · Restricted Project, Restricted Project
pmatos closed D101656: [WebAssembly] Fixup order of ins variables for table instructions.

Merged by @tlively as https://github.com/llvm/llvm-project/commit/cd460c4d11eeeca485353ad6a1961b543980b664
In the meantime I got committers rights. Thanks.

May 4 2021, 4:32 AM · Restricted Project

May 1 2021

pmatos added a comment to D101656: [WebAssembly] Fixup order of ins variables for table instructions.

I don't think there are any uses of these instructions in emscripten and I doubt there are any emscripten users using the assembly format.

@sunfishcode do you know of anyone using these assembly instructions?

May 1 2021, 5:46 AM · Restricted Project
pmatos added a comment to D101656: [WebAssembly] Fixup order of ins variables for table instructions.

I think all of emscripten's use of the table is still via the JS API (e.g. src/runtime_functions.js) so this probably won't break emscripten. It does seem likely that nobody is using these instructions via assembly.
Is this the only change needed? Do we have no tests of these asm instructions anywhere in LLVM at all?

May 1 2021, 5:46 AM · Restricted Project

Apr 30 2021

pmatos added a reviewer for D101656: [WebAssembly] Fixup order of ins variables for table instructions: sbc100.
Apr 30 2021, 12:50 PM · Restricted Project
pmatos added a comment to D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR.

A quick note - apparently phab felt that since I accepted the revision, it's now ready to land. Probably obvious but I accepted expecting @tlively comments to be addressed first. :)

Apr 30 2021, 12:15 PM · Restricted Project, Restricted Project
pmatos accepted D101608: [WebAssembly] Support for WebAssembly globals in LLVM IR.

This looks good to me - I will rebase D95425 on this.

Apr 30 2021, 12:12 PM · Restricted Project, Restricted Project
pmatos requested review of D101656: [WebAssembly] Fixup order of ins variables for table instructions.
Apr 30 2021, 12:09 PM · Restricted Project

Apr 27 2021

pmatos added inline comments to D95425: Implementation of global.get/set for reftypes in LLVM IR.
Apr 27 2021, 7:41 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Make TABLE_SET node polymorphic. Deal with types through the Pats. One for funcref and one for externref.

Apr 27 2021, 3:59 AM · Restricted Project, Restricted Project
pmatos added inline comments to D95425: Implementation of global.get/set for reftypes in LLVM IR.
Apr 27 2021, 1:15 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Fix else if and VT type as suggested by @wingo.

Apr 27 2021, 1:12 AM · Restricted Project, Restricted Project
pmatos added inline comments to D95425: Implementation of global.get/set for reftypes in LLVM IR.
Apr 27 2021, 12:39 AM · Restricted Project, Restricted Project
pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

There are still two things missing:

  1. Clear the table entry after the call_indirect to avoid hidden GC roots as mentioned by @wingo
  2. Understand how to handle a ret %extern undef - comment by @tlively
Apr 27 2021, 12:37 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Add missing newlines at the end of test files

Apr 27 2021, 12:27 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Take care of some syntax linting/style comments

Apr 27 2021, 12:03 AM · Restricted Project, Restricted Project

Apr 26 2021

pmatos added inline comments to D95425: Implementation of global.get/set for reftypes in LLVM IR.
Apr 26 2021, 11:59 PM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Use PointerType to avoid defining types for externref and funcref.

Apr 26 2021, 9:14 AM · Restricted Project, Restricted Project

Apr 23 2021

pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

Apparently getTypeForEVT in LowerArguments is only necessary to call the getABIAlignmentForCallingConv. I was thinking that since reference types really are pointers to different address spaces we could return their TypeForEVT as being int32. That will then return as the alignment for reference types the default alignment for int32. This should help with avoiding us touching middle end code. I will experiment in this direction.

Apr 23 2021, 5:56 AM · Restricted Project, Restricted Project
pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

I'm still not comfortable approving this patch with changes to llvm-c/, Bitcode/, or IR/. If those changes can't be backed out, this will require an RFC on llvm-dev, but I would be surprised if that were necessary.

Apr 23 2021, 5:16 AM · Restricted Project, Restricted Project

Apr 19 2021

pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

Are there any further comments to this patch before landing?

Apr 19 2021, 1:34 AM · Restricted Project, Restricted Project

Apr 14 2021

pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Fix table name for funcref calls

Apr 14 2021, 2:27 AM · Restricted Project, Restricted Project

Apr 13 2021

pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Clarify many of the issues requested in previous review comments.

Apr 13 2021, 7:26 AM · Restricted Project, Restricted Project
pmatos added inline comments to D95425: Implementation of global.get/set for reftypes in LLVM IR.
Apr 13 2021, 7:14 AM · Restricted Project, Restricted Project

Mar 26 2021

pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

Once again, are the changes to the LLVM IR (LLVMTypeKind & friends) actually needed?
I'm not seeing any usages of that in the tests.

Hi, I was going refer to those in a separate comment. My apologies for the delay.
Those were required to get this to work due to a call in SelectionDAGBuilder.cpp (current like 9966) to VT.getTypeForEVT. This requires me to create a type for the EVT externref and funcref. This forced the change to ValueTypes.cpp. Once you create the Type for externref and funcref the other changes come along either by necessity or to avoid warnings that certain cases were not handled in switches.

It would make sense for VT.getTypeForEVT to return the appropriate address space pointer types that we are lowering to externref and funcref, right?

Mar 26 2021, 4:11 AM · Restricted Project, Restricted Project

Mar 23 2021

pmatos added inline comments to D95425: Implementation of global.get/set for reftypes in LLVM IR.
Mar 23 2021, 5:37 AM · Restricted Project, Restricted Project
pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

Once again, are the changes to the LLVM IR (LLVMTypeKind & friends) actually needed?
I'm not seeing any usages of that in the tests.

Mar 23 2021, 1:14 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Reformat patch with clang-format-diff.py

Mar 23 2021, 12:44 AM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Small fixes:

  • Set Align(1) for reference types
  • Remove unused node
  • Make webassembly target description string dependent on feature string (fixes clang tests)
Mar 23 2021, 12:41 AM · Restricted Project, Restricted Project

Mar 22 2021

pmatos added inline comments to D95425: Implementation of global.get/set for reftypes in LLVM IR.
Mar 22 2021, 11:33 AM · Restricted Project, Restricted Project

Mar 19 2021

pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

Why are IR-level changes needed if these are generated during lowering?
Will this play well with typeless pointers?

Mar 19 2021, 1:16 AM · Restricted Project, Restricted Project

Mar 17 2021

pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Remove commented code that shouldn't be there in the first place.

Mar 17 2021, 1:41 PM · Restricted Project, Restricted Project
pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

A few data points on the patch. Externrefs live in address space 1 and funcrefs in address space 3. Externref globals live in address space 2 and funcref globals live in address space 4.

Mar 17 2021, 1:37 PM · Restricted Project, Restricted Project
pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Complete patch ready for review.

Mar 17 2021, 1:25 PM · Restricted Project, Restricted Project

Feb 1 2021

pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Attempt to specify externref as a pointer type with a fixed size of 32, instead of opaque.

Feb 1 2021, 10:41 AM · Restricted Project, Restricted Project

Jan 26 2021

pmatos updated the diff for D95425: Implementation of global.get/set for reftypes in LLVM IR.

Fix getLegalType for simple MVTs

Jan 26 2021, 5:20 AM · Restricted Project, Restricted Project
pmatos added a comment to D95425: Implementation of global.get/set for reftypes in LLVM IR.

This is very, very WIP patch implementing LLVM IR support for global.get/set.

Jan 26 2021, 1:02 AM · Restricted Project, Restricted Project
pmatos requested review of D95425: Implementation of global.get/set for reftypes in LLVM IR.
Jan 26 2021, 12:50 AM · Restricted Project, Restricted Project

Nov 30 2020

pmatos abandoned D91428: Add support for multiple program address spaces.

Thanks, @arichardson and @jrtc27 for your comments.
I am definitely surprised to find that if you explicitly mark the call with the address space, this patch is not required. At first look, this RFC is not required any more but I need sometime to investigate further. If no changes are necessary, this is indeed good news.

Nov 30 2020, 10:51 AM · Restricted Project, Restricted Project

Nov 24 2020

pmatos added a comment to D91428: Add support for multiple program address spaces.

Thanks, @arichardson and @jrtc27 for your comments.
I am definitely surprised to find that if you explicitly mark the call with the address space, this patch is not required. At first look, this RFC is not required any more but I need sometime to investigate further. If no changes are necessary, this is indeed good news.

Nov 24 2020, 2:32 AM · Restricted Project, Restricted Project

Nov 19 2020

pmatos added a comment to D91428: Add support for multiple program address spaces.

The RFC has now been sent to the mailing list: http://lists.llvm.org/pipermail/llvm-dev/2020-November/146723.html

Nov 19 2020, 2:50 AM · Restricted Project, Restricted Project

Nov 16 2020

pmatos updated the diff for D91428: Add support for multiple program address spaces.

Fix type check.

Nov 16 2020, 8:07 AM · Restricted Project, Restricted Project
pmatos updated the diff for D91428: Add support for multiple program address spaces.

Ensure the program address spaces vector doesn't contain duplicates.

Nov 16 2020, 5:52 AM · Restricted Project, Restricted Project

Nov 13 2020

pmatos added a comment to D91428: Add support for multiple program address spaces.

This is WIP - there a still a few test failures but I am happy to start getting comments on this.

Nov 13 2020, 7:50 AM · Restricted Project, Restricted Project
pmatos requested review of D91428: Add support for multiple program address spaces.
Nov 13 2020, 7:45 AM · Restricted Project, Restricted Project

Oct 23 2020

pmatos added a comment to D89797: [WebAssembly] Implementation of (most) table instructions.

@sbc100 if it's ok for you, feel free to merge, thanks.

Oct 23 2020, 1:31 AM · Restricted Project
pmatos updated the diff for D89797: [WebAssembly] Implementation of (most) table instructions.

Align with local indent style

Oct 23 2020, 1:30 AM · Restricted Project

Oct 22 2020

pmatos added inline comments to D89797: [WebAssembly] Implementation of (most) table instructions.
Oct 22 2020, 11:09 PM · Restricted Project
pmatos updated the diff for D89797: [WebAssembly] Implementation of (most) table instructions.

Remove unused operand type.

Oct 22 2020, 3:31 AM · Restricted Project
pmatos added a comment to D89797: [WebAssembly] Implementation of (most) table instructions.

Is this good to merge?

Oct 22 2020, 1:29 AM · Restricted Project

Oct 21 2020

pmatos added inline comments to D89797: [WebAssembly] Implementation of (most) table instructions.
Oct 21 2020, 9:36 AM · Restricted Project
pmatos added a comment to D89797: [WebAssembly] Implementation of (most) table instructions.

Regarding linter clang-format suggestions - should I reformat the code as suggested or leave it?
Some suggested changes are not necessarily on code I wrote, which is why I ask.

Oct 21 2020, 8:10 AM · Restricted Project
pmatos updated the diff for D89797: [WebAssembly] Implementation of (most) table instructions.

These changes reflect the first set of comments. High on the list is quite a few changes related to setting registers for funcrefs and externrefs. A few things might not be strictly necessary but pave the way for future work.

Oct 21 2020, 6:28 AM · Restricted Project
pmatos added a comment to D89797: [WebAssembly] Implementation of (most) table instructions.

Thanks for the review - I will submit a new revision.

Oct 21 2020, 6:10 AM · Restricted Project

Oct 20 2020

pmatos added a comment to D89797: [WebAssembly] Implementation of (most) table instructions.

So the goal here is to add most of the table instructions. This introduces some table relocations, which (in a following patch) we will resolve in the linker.

Oct 20 2020, 8:32 AM · Restricted Project
pmatos requested review of D89797: [WebAssembly] Implementation of (most) table instructions.
Oct 20 2020, 8:25 AM · Restricted Project

Oct 13 2020

pmatos retitled D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files from Added .tabletype to asm and multiple table support in obj files to [WebAssembly] Added .tabletype to asm and multiple table support in obj files.
Oct 13 2020, 7:45 AM · Restricted Project
pmatos updated the diff for D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

Further test fixes - missing index

Oct 13 2020, 3:16 AM · Restricted Project
pmatos added a comment to D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

I seeing:

llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:111:11: warning: enumeration value 'FUNCREF' not handled in switch [-Wswitch]
  switch (VT) {

Oh, I was not getting that. It seems to come from https://github.com/llvm/llvm-project/commit/3bba91f64eef15956f589fa446c265a714cc7893 and I hadn't pulled that in yet. If I rebase my patch on this then yes, I can see the warning. i will fix it in this patch. No worries.

Oct 13 2020, 2:31 AM · Restricted Project
pmatos updated the diff for D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

Fix warning due to missing FUNCREF in switch

Oct 13 2020, 1:35 AM · Restricted Project

Oct 12 2020

pmatos added a comment to D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

I seeing:

llvm-project/llvm/lib/Target/WebAssembly/WebAssemblyAsmPrinter.cpp:111:11: warning: enumeration value 'FUNCREF' not handled in switch [-Wswitch]
  switch (VT) {
Oct 12 2020, 11:30 PM · Restricted Project
pmatos updated the diff for D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

Fix a bunch more lld tests to include index for tables

Oct 12 2020, 9:48 PM · Restricted Project
pmatos added a comment to D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

Is this ready to land now?

Oct 12 2020, 1:30 PM · Restricted Project
pmatos updated the diff for D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

Fix tests to include table index in expected dump

Oct 12 2020, 1:28 PM · Restricted Project
pmatos updated the diff for D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

Fix build failure

Oct 12 2020, 11:05 AM · Restricted Project
pmatos added inline comments to D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.
Oct 12 2020, 10:37 AM · Restricted Project
pmatos updated the diff for D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

Move Index to first position in WasmTable struct

Oct 12 2020, 10:35 AM · Restricted Project
pmatos updated the diff for D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

Fix review nits

Oct 12 2020, 8:24 AM · Restricted Project
pmatos added inline comments to D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.
Oct 12 2020, 7:40 AM · Restricted Project

Oct 9 2020

pmatos added a comment to D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.

Thanks for the reviews. I will fix the nits mentioned and update the revision.

Oct 9 2020, 3:39 AM · Restricted Project

Oct 5 2020

pmatos requested review of D88815: [WebAssembly] Added .tabletype to asm and multiple table support in obj files.
Oct 5 2020, 3:01 AM · Restricted Project

Sep 24 2020

pmatos abandoned D88226: Add debug option to wasm-ld to enable LLVM style debug info.

This is already supported like via -mllvm. E.g. wasm-ld -mllvm -debug or wasm-ld -mllvm -debug-only=lld

Sep 24 2020, 9:03 PM · Restricted Project
pmatos added reviewers for D88226: Add debug option to wasm-ld to enable LLVM style debug info: sbc100, tlively.
Sep 24 2020, 6:47 AM · Restricted Project
pmatos requested review of D88226: Add debug option to wasm-ld to enable LLVM style debug info.
Sep 24 2020, 6:43 AM · Restricted Project

Aug 5 2020

pmatos abandoned D66035: [WebAssembly] WIP: Add support for reference types.
Aug 5 2020, 3:40 AM · Restricted Project, Restricted Project

Jul 31 2020

pmatos updated the diff for D66035: [WebAssembly] WIP: Add support for reference types.

Update externref patch

Jul 31 2020, 5:04 AM · Restricted Project, Restricted Project
pmatos abandoned D85022: Need to ensure the datalayout differs when using externref.

Mistakingly created - this should have gone to D66035

Jul 31 2020, 4:45 AM · Restricted Project
pmatos requested review of D85022: Need to ensure the datalayout differs when using externref.
Jul 31 2020, 4:43 AM · Restricted Project
pmatos added a comment to D66035: [WebAssembly] WIP: Add support for reference types.

I will be splitting the part enabling the target feature through clang into a separate revision as suggested by @tlively

Jul 31 2020, 3:18 AM · Restricted Project, Restricted Project

Jul 29 2020

pmatos added a comment to D66035: [WebAssembly] WIP: Add support for reference types.

I will be splitting the part enabling the target feature through clang into a separate revision as suggested by @tlively

Jul 29 2020, 6:43 AM · Restricted Project, Restricted Project
pmatos updated the diff for D66035: [WebAssembly] WIP: Add support for reference types.

Update patch to compile against current master branch

Jul 29 2020, 5:47 AM · Restricted Project, Restricted Project

Jul 28 2020

pmatos added a reviewer for D66035: [WebAssembly] WIP: Add support for reference types: sbc100.
Jul 28 2020, 6:18 AM · Restricted Project, Restricted Project
pmatos added a comment to D66035: [WebAssembly] WIP: Add support for reference types.

Related work: https://reviews.llvm.org/D81977

Jul 28 2020, 6:17 AM · Restricted Project, Restricted Project
pmatos added a comment to D66035: [WebAssembly] WIP: Add support for reference types.

There's also this line of work on opaque types that could be potentially interested but seems far from being landed: https://groups.google.com/g/llvm-dev/c/Dw_DYSXGFto/m/OzzK-CkGAwAJ

Jul 28 2020, 3:09 AM · Restricted Project, Restricted Project
pmatos added a comment to D66035: [WebAssembly] WIP: Add support for reference types.

Please ignore my .gitlab-ci.yml. That's just an internal change that I got uploaded by mistake.
I am looking to see this through and start discussion on this with the goal of landing it.

Jul 28 2020, 2:54 AM · Restricted Project, Restricted Project