[PATCH] D150666: [WIP][GlobalISel] Combiner Intrinsic Matching
Pierre van Houtryve via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 16 06:07:08 PDT 2023
Pierre-vh created this revision.
Pierre-vh added reviewers: arsenm, dsanders, aemerson.
Herald added a project: All.
Pierre-vh requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Adds support for matching intrinsics in a match pattern in the combiner.
They can be matched using the same syntax as the DAG patterns, i.e.
(match (int_foo_intrinsic $d))
The current state of the implementation is not ideal, there are 2 issues at the moment:
- All the apply code + the remaining match code (wwhich checks the intrinsic ID) is duplicated for each `G_INTRINSIC_*` opcode.
- Intrinsics cannot (yet) be used as leaf nodes if the previous node is a "fully-testable" node (e.g. a simple opcode match).
Solves #62628 (https://github.com/llvm/llvm-project/issues/62628)
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D150666
Files:
llvm/test/TableGen/GICombinerEmitter/match-tree.td
llvm/test/TableGen/GICombinerEmitter/parse-match-pattern.td
llvm/utils/TableGen/CodeGenIntrinsics.h
llvm/utils/TableGen/CodeGenTarget.cpp
llvm/utils/TableGen/CodeGenTarget.h
llvm/utils/TableGen/GICombinerEmitter.cpp
llvm/utils/TableGen/GlobalISel/GIMatchDag.h
llvm/utils/TableGen/GlobalISel/GIMatchDagOperands.cpp
llvm/utils/TableGen/GlobalISel/GIMatchDagOperands.h
llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.cpp
llvm/utils/TableGen/GlobalISel/GIMatchDagPredicate.h
llvm/utils/TableGen/GlobalISel/GIMatchTree.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D150666.522570.patch
Type: text/x-patch
Size: 26777 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230516/15786c11/attachment-0001.bin>
More information about the llvm-commits
mailing list