This is an archive of the discontinued LLVM Phabricator instance.

[WebAssembly] Update supported features in the generic CPU configuration
ClosedPublic

Authored by sunfish on May 16 2022, 2:56 PM.

Diff Detail

Event Timeline

sunfish created this revision.May 16 2022, 2:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2022, 2:56 PM
sunfish requested review of this revision.May 16 2022, 2:56 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 16 2022, 2:56 PM
Herald added a subscriber: aheejin. · View Herald Transcript
asb added a comment.May 17 2022, 8:32 AM

Thanks, I think CodeGen/WebAssembly/target-features.ll could be updated to add a -mcpu=generic test?

sunfish updated this revision to Diff 431083.May 20 2022, 3:55 PM

Update tests to use -mcpu=mvp to avoid breaking their target features when -mcpu=generic changes. And update target-features.ll to for the new -mcpu=generic features.

asb accepted this revision.Jun 20 2022, 6:48 AM

LGTM, but it would be good to get an approval from someone else too.

llvm/test/CodeGen/WebAssembly/target-features.ll
57–58

This comment is now out of date.

This revision is now accepted and ready to land.Jun 20 2022, 6:48 AM

On the emscripten side we still need to come up with a framework that will disable these new defaults when users select older browser support. I'm not sure if we want to push back on landing this until such as frameworks is in place, or just go ahead and land this and deal with the change when it rolls in. @tlively @dschuff @kripken ?

kripken added inline comments.Jun 21 2022, 8:13 AM
llvm/lib/Target/WebAssembly/WebAssembly.td
99

It might be worth explaining what "latest stable" means here: how were the features here chosen, how often this is updated, etc.

Maybe we could have a page in the tool-conventions repo with a doc for all that? Ideally the plan there would cover all major wasm toolchains. Then we could all link to there. I think that would really help users in our ecosystem understand how this stuff works.

sunfish updated this revision to Diff 468633.Oct 18 2022, 11:35 AM
sunfish marked 2 inline comments as done.
  • Add a comment about what "generic" means.
llvm/lib/Target/WebAssembly/WebAssembly.td
99

I've now updated this to say:

This includes features that achieved phase 4 of the standards process, and
that are supported in enough tools and engines that they're expected to work
for most users in most settings.

That is somewhat vague, but I believe represents our actual intent here. I'll post to https://github.com/WebAssembly/tool-conventions/issues/158 about this for broader discussion.

kripken added inline comments.Oct 18 2022, 11:39 AM
llvm/lib/Target/WebAssembly/WebAssembly.td
99

Sounds good, thanks.

sunfish updated this revision to Diff 468742.Oct 18 2022, 4:49 PM
  • Remove bulk-memory and nontrapping-fptoint.
This revision was landed with ongoing or failed builds.Oct 25 2022, 11:43 AM
This revision was automatically updated to reflect the committed changes.
thakis added a subscriber: thakis.Oct 25 2022, 11:53 AM

This might have broken check-lld: http://45.33.8.238/linux/89856/step_11.txt

Please take a look and revert for now if it takes a while to fix.

This might have broken check-lld: http://45.33.8.238/linux/89856/step_11.txt

Please take a look and revert for now if it takes a while to fix.

I'm looking into it now.

This might have broken check-lld: http://45.33.8.238/linux/89856/step_11.txt

Please take a look and revert for now if it takes a while to fix.

I'm looking into it now.

I've now submitted b5d0bf9b9853688d34290fafdd31c95aca58f624 which fixes these failures.

Thanks!

Looks like it breaks check-llvm too: http://45.33.8.238/linux/89859/step_12.txt

dyung added a subscriber: dyung.Oct 25 2022, 2:31 PM

Thanks!

Looks like it breaks check-llvm too: http://45.33.8.238/linux/89859/step_12.txt

Yes, we are seeing these 10 failures on our internal bot as well the public bot https://lab.llvm.org/buildbot/#/builders/109/builds/49346

dyung added a comment.Oct 25 2022, 4:37 PM

I tried to fix the remaining tests by adding -mcpu=mvp, but at least 2 of the 10 tests (debug-info.ll and debug-info64.ll) still failed and it wasn't obvious how to fix them, so I ended up reverting your original change and the follow-up commit to get the bots back to green since these tests are failing on a lot of bots.