[PATCH] D71137: [RFC][mips][llvm-exegesis] Fix missing TargetStreamer in the Streamer for reading snippets

Miloš Stojanović via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 9 07:19:15 PST 2019


mstojanovic added a comment.

Yes, other targets do have it but use it quite sparingly. X86 almost never uses it but there are some edge cases when parsing certain directives. For example, this line will trigger an assert fail because of an uninitialized `TargetStreamer` on X86:

  echo ".cv_fpo_proc foo 4" | llvm-exegesis -mode latency -snippets-file=-

MIPS on the other hand uses `TargetStreamer` right at the start of the `MipsAsmParser` constructor and throughout the code used for parsing. The design of this MIPS code is quite different from other architectures (always relying on `TargetStreamer` or Assembler). I'm not sure if this was out of necessity or if it just evolved in to different path. Either way, the current code doesn't facilitate simple instruction extraction without all the necessary elements being in place.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D71137/new/

https://reviews.llvm.org/D71137





More information about the llvm-commits mailing list