Stream: git-wasmtime

Topic: wasmtime / Issue #1766 Cranelift: AND/OR expressions for ...


view this post on Zulip Wasmtime GitHub notifications bot (May 26 2020 at 23:09):

abrown opened Issue #1766:

<!-- Please try to describe precisely what you would like to do in
Cranelift/Wasmtime and/or expect from it. You can answer the questions below if
they're relevant and delete this text before submitting. Thanks for opening an
issue! -->

Feature

Add the ability to link SettingPredicateNumbers with AND and OR.

<!-- What is the feature or code improvement you would like to do in
Cranelift/Wasmtime? -->

Benefit

When passing around SettingPredicateNumbers (i.e. the identifiers for CPU features), I do not see a way to create an OR expression for various CPU features. This functionality is available for InstructionPredicationNodes (which are used in, e.g., EncodingBuilder::inst_predicate), but not for SettingPredicateNumbers (which are used in, e.g., EncodingBuilder::isa_predicate). Since some encodings are present under more than one CPU feature, it would be good to be able to express this.
<!-- What is the value of adding this in Cranelift/Wasmtime? -->

Implementation

Unsure, but:

<!-- Do you have an implementation plan, and/or ideas for data structures or
algorithms to use? -->

Alternatives

I don't yet see any.
<!-- Have you considered alternative implementations? If so, how are they
better or worse than your proposal? -->

view this post on Zulip Wasmtime GitHub notifications bot (May 26 2020 at 23:10):

abrown commented on Issue #1766:

cc: @bnjbvr, @iximeow, @sunfishcode

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2020 at 16:07):

abrown commented on Issue #1766:

Needed in order to add correct predicates for VPMULLQ eventually VCVTTUDQ2PS

view this post on Zulip Wasmtime GitHub notifications bot (May 27 2020 at 16:07):

abrown edited a comment on Issue #1766:

Needed in order to add correct predicates for VPMULLQ eventually VCVTUDQ2PS

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2020 at 15:03):

bnjbvr commented on Issue #1766:

It's a bit hidden, but I think you can already do this: does something like this work for your use case? https://github.com/bytecodealliance/wasmtime/blob/master/cranelift/codegen/meta/src/isa/x86/settings.rs#L54

view this post on Zulip Wasmtime GitHub notifications bot (Jun 03 2020 at 17:34):

abrown commented on Issue #1766:

That creates a new flag, which isn't exactly what I was trying to do--in the extreme that could create a flag explosion if I start combining different flags together. And I don't see a way for that to support OR-ing of predicates. What I am trying to do is to "add this encoding that is valid when either flag A OR flag B is enabled."

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2020 at 15:54):

bnjbvr labeled Issue #1766:

<!-- Please try to describe precisely what you would like to do in
Cranelift/Wasmtime and/or expect from it. You can answer the questions below if
they're relevant and delete this text before submitting. Thanks for opening an
issue! -->

Feature

Add the ability to link SettingPredicateNumbers with AND and OR.

<!-- What is the feature or code improvement you would like to do in
Cranelift/Wasmtime? -->

Benefit

When passing around SettingPredicateNumbers (i.e. the identifiers for CPU features), I do not see a way to create an OR expression for various CPU features. This functionality is available for InstructionPredicationNodes (which are used in, e.g., EncodingBuilder::inst_predicate), but not for SettingPredicateNumbers (which are used in, e.g., EncodingBuilder::isa_predicate). Since some encodings are present under more than one CPU feature, it would be good to be able to express this.
<!-- What is the value of adding this in Cranelift/Wasmtime? -->

Implementation

Unsure, but:

<!-- Do you have an implementation plan, and/or ideas for data structures or
algorithms to use? -->

Alternatives

I don't yet see any.
<!-- Have you considered alternative implementations? If so, how are they
better or worse than your proposal? -->

view this post on Zulip Wasmtime GitHub notifications bot (Jun 29 2020 at 15:54):

github-actions[bot] commented on Issue #1766:

Subscribe to Label Action

cc @bnjbvr

<details>
This issue or pull request has been labeled: "cranelift"

Thus the following users have been cc'd because of the following labels:

To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Feb 03 2021 at 18:27):

bjorn3 commented on Issue #1766:

I don't think this is necessary anymore for the new backend framework.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 03 2021 at 18:28):

abrown closed Issue #1766:

<!-- Please try to describe precisely what you would like to do in
Cranelift/Wasmtime and/or expect from it. You can answer the questions below if
they're relevant and delete this text before submitting. Thanks for opening an
issue! -->

Feature

Add the ability to link SettingPredicateNumbers with AND and OR.

<!-- What is the feature or code improvement you would like to do in
Cranelift/Wasmtime? -->

Benefit

When passing around SettingPredicateNumbers (i.e. the identifiers for CPU features), I do not see a way to create an OR expression for various CPU features. This functionality is available for InstructionPredicationNodes (which are used in, e.g., EncodingBuilder::inst_predicate), but not for SettingPredicateNumbers (which are used in, e.g., EncodingBuilder::isa_predicate). Since some encodings are present under more than one CPU feature, it would be good to be able to express this.
<!-- What is the value of adding this in Cranelift/Wasmtime? -->

Implementation

Unsure, but:

<!-- Do you have an implementation plan, and/or ideas for data structures or
algorithms to use? -->

Alternatives

I don't yet see any.
<!-- Have you considered alternative implementations? If so, how are they
better or worse than your proposal? -->


Last updated: Oct 23 2024 at 20:03 UTC