[PATCH] D125212: [GlobalISel] Allow destination patterns having empty outs

Matt Arsenault via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 17 06:26:08 PDT 2022


arsenm added a comment.

In D125212#3518566 <https://reviews.llvm.org/D125212#3518566>, @abinavpp wrote:

> I agree with you on omitting the predicates if the field is set to
> false/uninitialized. In that case, how about we add the following to
> PatFrags:
>
>   // If set to true, a predicate is added that checks for at least one use of
>   // the return value; Otherwise no predicate is added.
>   bit HasUse = ?;
>   // If set to true, a predicate is added that checks for no use of the return
>   // value; Otherwise no predicate is added.
>   //
>   // The TableGen backend asserts that both HasUse and HasNoUse is not set to
>   // true.
>   bit HasNoUse = ?;

Yes. The way the PatFrags are structured this is two different predicates the emitter needs to enforce are mutually exclusive. This only really makes sense if you look at how this is implemented


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D125212/new/

https://reviews.llvm.org/D125212



More information about the llvm-commits mailing list