This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Use ComplexPattern on remaining memory instructions
ClosedPublic

Authored by luke on Dec 13 2022, 9:40 AM.

Details

Summary

This continues the refactoring work of selecting offset + address operands with the AddrOpsN pattern, previously called LoadOpsN.

This is not an NFC, since constant addresses are now folded into the offset in more places for v128.storeN_lane.

Diff Detail

Event Timeline

luke created this revision.Dec 13 2022, 9:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 13 2022, 9:40 AM
luke requested review of this revision.Dec 13 2022, 9:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptDec 13 2022, 9:40 AM
luke updated this revision to Diff 482529.Dec 13 2022, 9:48 AM

Update comments to be more clear

Nice!

llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
14–33

It looks we don't convert atomic stores in this CL.. Is that going to be a follow-up, or is that not included in the plan? Is converting them different from the normal stores?

llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td
24–35

Nit: 80 col wrapping

luke added inline comments.Dec 14 2022, 2:11 AM
llvm/lib/Target/WebAssembly/WebAssemblyInstrAtomics.td
14–33

I’ve been working on atomic as part of a separate diff, but happy to include them in this one if that’s easier!
The conversion process is the same, and for the atomic instructions you’ll be glad to hear it saves a lot of tablegen.

luke added inline comments.Dec 14 2022, 2:51 AM
llvm/lib/Target/WebAssembly/WebAssemblyInstrMemory.td
24–35

I think this is wrapped to 80 columns, unfortunately just a poor choice of long, awkward to wrap words :(

luke updated this revision to Diff 482773.Dec 14 2022, 2:55 AM

Use AddrOps on atomic instructions

luke updated this revision to Diff 482774.Dec 14 2022, 2:56 AM

Include both commits

luke retitled this revision from [WebAssembly] Use ComplexPattern on store address operands to [WebAssembly] Use ComplexPattern on remaining memory instructions.Dec 14 2022, 2:57 AM
aheejin accepted this revision.Dec 14 2022, 12:07 PM

Thank you! This looks certainly easier to read and manage.

This revision is now accepted and ready to land.Dec 14 2022, 12:07 PM
This revision was landed with ongoing or failed builds.Dec 15 2022, 2:21 AM
This revision was automatically updated to reflect the committed changes.