[all-commits] [llvm/llvm-project] 39fc67: [llvm-exegesis] Factor out DisassemblerHelper from...

Pavel Kosov via All-commits all-commits at lists.llvm.org
Mon Apr 3 23:18:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 39fc67b8af707f6bdcbcfbec1e17f14ffbaeecb8
      https://github.com/llvm/llvm-project/commit/39fc67b8af707f6bdcbcfbec1e17f14ffbaeecb8
  Author: Pavel Kosov <kpdev42 at gmail.com>
  Date:   2023-04-04 (Tue, 04 Apr 2023)

  Changed paths:
    M llvm/tools/llvm-exegesis/lib/Analysis.cpp
    M llvm/tools/llvm-exegesis/lib/Analysis.h
    M llvm/tools/llvm-exegesis/lib/CMakeLists.txt
    A llvm/tools/llvm-exegesis/lib/DisassemblerHelper.cpp
    A llvm/tools/llvm-exegesis/lib/DisassemblerHelper.h

  Log Message:
  -----------
  [llvm-exegesis] Factor out DisassemblerHelper from the Analysis class

As part of preparing the reports, the Analysis class needs to print
machine instructions in a disassembled form. For this purpose, the class
has four fields (namely Context_, AsmInfo_, InstPrinter_ and Disasm_).
All the constructor of the Analysis class does is conditionally
initializing these four fields.

This commit factors out the logic for decoding machine code and printing
it in an assembler form into a separate DisassemblerHelper class.

~~

Huawei RRI, OS Lab

Reviewed By: courbet

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




More information about the All-commits mailing list