[all-commits] [llvm/llvm-project] b2f4c5: [AsmWriter] Factor out mnemonic generation to acce...

Florian Hahn via All-commits all-commits at lists.llvm.org
Tue Nov 17 01:48:34 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b2f4c5fddc767481ff2532505554dc93550e4d06
      https://github.com/llvm/llvm-project/commit/b2f4c5fddc767481ff2532505554dc93550e4d06
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-11-17 (Tue, 17 Nov 2020)

  Changed paths:
    M llvm/include/llvm/MC/MCInstPrinter.h
    M llvm/lib/Target/AArch64/MCTargetDesc/AArch64InstPrinter.h
    M llvm/lib/Target/AMDGPU/MCTargetDesc/AMDGPUInstPrinter.h
    M llvm/lib/Target/ARC/MCTargetDesc/ARCInstPrinter.h
    M llvm/lib/Target/ARM/MCTargetDesc/ARMInstPrinter.h
    M llvm/lib/Target/AVR/MCTargetDesc/AVRInstPrinter.h
    M llvm/lib/Target/BPF/MCTargetDesc/BPFInstPrinter.h
    M llvm/lib/Target/Hexagon/MCTargetDesc/HexagonInstPrinter.h
    M llvm/lib/Target/Lanai/MCTargetDesc/LanaiInstPrinter.h
    M llvm/lib/Target/MSP430/MCTargetDesc/MSP430InstPrinter.h
    M llvm/lib/Target/Mips/MCTargetDesc/MipsInstPrinter.h
    M llvm/lib/Target/NVPTX/MCTargetDesc/NVPTXInstPrinter.h
    M llvm/lib/Target/PowerPC/MCTargetDesc/PPCInstPrinter.h
    M llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.h
    M llvm/lib/Target/Sparc/MCTargetDesc/SparcInstPrinter.h
    M llvm/lib/Target/SystemZ/MCTargetDesc/SystemZInstPrinter.h
    M llvm/lib/Target/WebAssembly/MCTargetDesc/WebAssemblyInstPrinter.h
    M llvm/lib/Target/X86/MCTargetDesc/X86ATTInstPrinter.h
    M llvm/lib/Target/X86/MCTargetDesc/X86IntelInstPrinter.h
    M llvm/lib/Target/XCore/MCTargetDesc/XCoreInstPrinter.h
    M llvm/utils/TableGen/AsmWriterEmitter.cpp

  Log Message:
  -----------
  [AsmWriter] Factor out mnemonic generation to accessible getMnemonic.

This patch factors out the part of printInstruction that gets the
mnemonic string for a given MCInst. This is intended to be used
subsequently for the instruction-mix remarks to display the final
mnemonic (D90040).

Unfortunately making `getMnemonic` available to the AsmPrinter
seems to require making it virtual. Not sure if there's a way around
that with the current layering of the AsmPrinters.

Reviewed By: Paul-C-Anagnostopoulos

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




More information about the All-commits mailing list