[all-commits] [llvm/llvm-project] 39662a: [MIPatternMatch]: Add mi_match for MachineInstr

petar-avramovic via All-commits all-commits at lists.llvm.org
Tue Apr 27 02:28:58 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 39662abf720fc195b549246f32719d313f05a67f
      https://github.com/llvm/llvm-project/commit/39662abf720fc195b549246f32719d313f05a67f
  Author: Petar Avramovic <Petar.Avramovic at amd.com>
  Date:   2021-04-27 (Tue, 27 Apr 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/MIPatternMatch.h
    M llvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp

  Log Message:
  -----------
  [MIPatternMatch]: Add mi_match for MachineInstr

This utility allows more efficient start of pattern match.
Often MachineInstr(MI) is available and instead of using
mi_match(MI.getOperand(0).getReg(), MRI, ...) followed by
MRI.getVRegDef(Reg) that gives back MI we now use
mi_match(MI, MRI, ...).

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




More information about the All-commits mailing list