[llvm] [GlobalISel] Add boolean predicated legalization action methods. (PR #111287)
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 7 14:41:58 PDT 2024
aemerson wrote:
> For the new `legalFor` and `customFor`, I have a slight preference for replacing `For` with `If` . Then it is clear that the first parameter is a predicate and not a type.
We already have a predicated `legalIf` which takes a legality predicate. Not only that,
I'm not sure of this change. I get the motivation but I'm wondering if we have a better way to express it than having to plumb in a boolean into specific rules. Perhaps a guard wrapper or something so we can write:
```
AddIf(Cond, legalFor({s32, s64}))
```
and that way it generalizes to all of the rule methods.
https://github.com/llvm/llvm-project/pull/111287
More information about the llvm-commits
mailing list