[PATCH] D51994: TableGen/ISel: Allow PatFrag predicate code to access captured operands
Nicolai Hähnle via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 12 09:53:54 PDT 2018
nhaehnle created this revision.
nhaehnle added reviewers: arsenm, rampitec, RKSimon, craig.topper, hfinkel, uweigand.
Herald added subscribers: tpr, wdng.
This simplifies writing predicates for pattern fragments that are
automatically re-associated or commuted.
For example, a followup patch adds patterns for fragments of the form
(add (shl $x, $y), $z) to the AMDGPU backend. Such patterns are
automatically commuted to (add $z, (shl $x, $y)), which makes it basically
impossible to refer to $x, $y, and $z generically in the PredicateCode.
With this change, the PredicateCode can refer to $x, $y, and $z simply
as `Operands[i]`.
Test confirmed that there are no changes to any of the generated files
when building all (non-experimental) targets.
Change-Id: I61c00ace7eed42c1d4edc4c5351174b56b77a79c
Repository:
rL LLVM
https://reviews.llvm.org/D51994
Files:
include/llvm/CodeGen/SelectionDAGISel.h
include/llvm/Target/TargetSelectionDAG.td
lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
utils/TableGen/CodeGenDAGPatterns.cpp
utils/TableGen/CodeGenDAGPatterns.h
utils/TableGen/DAGISelMatcher.cpp
utils/TableGen/DAGISelMatcher.h
utils/TableGen/DAGISelMatcherEmitter.cpp
utils/TableGen/DAGISelMatcherGen.cpp
utils/TableGen/FastISelEmitter.cpp
utils/TableGen/GlobalISelEmitter.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D51994.165108.patch
Type: text/x-patch
Size: 31104 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180912/2ea62e8f/attachment-0001.bin>
More information about the llvm-commits
mailing list