[PATCH] D69077: [gicombiner] Add the MatchDag structure and parse instruction DAG's from the input

Daniel Sanders via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 25 13:52:18 PDT 2019


dsanders added a comment.

In D69077#1721805 <https://reviews.llvm.org/D69077#1721805>, @arsenm wrote:

> Is there a mechanism here for supporting hasOneUse checks?


At the moment it's available using the code-block escape hatch:

  (match ...
         [{ ...
            if (!MRI.hasOneUse(${root}.getOperand(1).getReg()))
              return false;
            ...
         }])

There's a patch that I haven't posted yet (just to keep the patches under review to a reasonable number) that adds the arbitrary C++ predicate feature (GIMatchPredicate from the original proposal) and that will be the preferred way to use it unless/until we decide that GIMatchTree (D69152 <https://reviews.llvm.org/D69152>) needs to be aware of it


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D69077





More information about the llvm-commits mailing list