[PATCH] D98486: [TableGen/GlobalISel] Emit MI_predicate custom code for PatFrags (not only PatFrag)

Bjorn Pettersson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 12 03:29:35 PST 2021


bjope created this revision.
bjope added reviewers: Petar.Avramovic, arsenm, dsanders.
Herald added a subscriber: rovka.
bjope requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

When GlobalISelEmitter::emitCxxPredicateFns emitted code for MI
predicates it used "PatFrag" when searching for definitions. With
this patch it will search for all "PatFrags" instead. Since PatFrag
derives from PatFrags the difference is that we now include all
definitions using PatFrags directly as well. Thus making it possible
to use GISelPredicateCode together with a PatFrags definition.

It might be noted that the matcher code was emitted also for PatFrags
in the past. But then one ended up with errors since the custom code
in testMIPredicate_MI was missing.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D98486

Files:
  llvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
  llvm/utils/TableGen/GlobalISelEmitter.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D98486.330199.patch
Type: text/x-patch
Size: 9291 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210312/38a0f381/attachment.bin>


More information about the llvm-commits mailing list