[all-commits] [llvm/llvm-project] 5ac3b3: [TableGen/GlobalISel] Emit MI_predicate custom cod...

Björn Pettersson via All-commits all-commits at lists.llvm.org
Tue Mar 16 04:44:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5ac3b37599d3da80887033df66ecea4aea4dc347
      https://github.com/llvm/llvm-project/commit/5ac3b37599d3da80887033df66ecea4aea4dc347
  Author: Bjorn Pettersson <bjorn.a.pettersson at ericsson.com>
  Date:   2021-03-16 (Tue, 16 Mar 2021)

  Changed paths:
    M llvm/test/TableGen/GlobalISelEmitterCustomPredicate.td
    M llvm/utils/TableGen/GlobalISelEmitter.cpp

  Log Message:
  -----------
  [TableGen/GlobalISel] Emit MI_predicate custom code for PatFrags (not only PatFrag)

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.

Differential Revision: https://reviews.llvm.org/D98486




More information about the All-commits mailing list