This is an archive of the discontinued LLVM Phabricator instance.

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

Authored by kpdev42 on Mar 29 2023, 6:58 AM.



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

Diff Detail

Event Timeline

kpdev42 created this revision.Mar 29 2023, 6:58 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 29 2023, 6:58 AM
Herald added a subscriber: mstojanovic. · View Herald Transcript
kpdev42 requested review of this revision.Mar 29 2023, 6:58 AM
kpdev42 edited the summary of this revision. (Show Details)
courbet accepted this revision.EditedApr 2 2023, 11:17 PM

No strong opinion on this, if you feel that's better that's fine with me.

This revision is now accepted and ready to land.Apr 2 2023, 11:17 PM