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
SettingPredicateNumber
s with AND and OR.<!-- What is the feature or code improvement you would like to do in
Cranelift/Wasmtime? -->Benefit
When passing around
SettingPredicateNumber
s (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 forInstructionPredicationNode
s (which are used in, e.g.,EncodingBuilder::inst_predicate
), but not forSettingPredicateNumber
s (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:
- perhaps there is a way to unify the
inst_
andisa_
predicates?<!-- 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? -->
abrown commented on Issue #1766:
cc: @bnjbvr, @iximeow, @sunfishcode
abrown commented on Issue #1766:
Needed in order to add correct predicates for
VPMULLQ
eventuallyVCVTTUDQ2PS
abrown edited a comment on Issue #1766:
Needed in order to add correct predicates for
VPMULLQ
eventuallyVCVTUDQ2PS
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
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."
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
SettingPredicateNumber
s with AND and OR.<!-- What is the feature or code improvement you would like to do in
Cranelift/Wasmtime? -->Benefit
When passing around
SettingPredicateNumber
s (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 forInstructionPredicationNode
s (which are used in, e.g.,EncodingBuilder::inst_predicate
), but not forSettingPredicateNumber
s (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:
- perhaps there is a way to unify the
inst_
andisa_
predicates?<!-- 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? -->
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:
- bnjbvr: cranelift
To subscribe or unsubscribe from this label, edit the <code>.github/subscribe-to-label.json</code> configuration file.
Learn more.
</details>
bjorn3 commented on Issue #1766:
I don't think this is necessary anymore for the new backend framework.
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
SettingPredicateNumber
s with AND and OR.<!-- What is the feature or code improvement you would like to do in
Cranelift/Wasmtime? -->Benefit
When passing around
SettingPredicateNumber
s (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 forInstructionPredicationNode
s (which are used in, e.g.,EncodingBuilder::inst_predicate
), but not forSettingPredicateNumber
s (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:
- perhaps there is a way to unify the
inst_
andisa_
predicates?<!-- 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: Dec 23 2024 at 12:05 UTC