[PATCH] D133646: Add a utility for converting between different types of remarks

Jessica Paquette via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 10:26:17 PDT 2022


paquette added a comment.

In D133646#3782507 <https://reviews.llvm.org/D133646#3782507>, @thegameg wrote:

> In D133646#3782500 <https://reviews.llvm.org/D133646#3782500>, @paquette wrote:
>
>> In D133646#3782446 <https://reviews.llvm.org/D133646#3782446>, @thegameg wrote:
>>
>>> One suggestion would be to have a `convert` subcommand that takes `bitstream2yaml` or `yaml2bitstream`, assuming this tool will be extended to do more (for example, one thing I want to add is `extract` from a mach-o object file). I don't have strong opinions though so if everyone is fine with this I'm also fine.
>>
>> What would this use-case look like in the (proposed) UI?
>
>
>
>   $ llvm-remarkutil -convert bitstream2yaml a.opt.bitstream -o a.opt.yaml
>   $ llvm-remarkutil -convert yaml2bitstream a.opt.bitstream -o a.opt.yaml
>   $ llvm-remarkutil -extract a.o -o a.opt.bitstream`
>
> is what I had in mind. Maybe having `-input-format=bitstream -output-format=yaml` is better for other use cases?

I don't think you'd actually need either of those because you could just pipe in/out of the tool, or am I missing something?

I was thinking it'd also be useful to have options like

  llvm-remarkutil stats --input=yaml <file>.yaml
  llvm-remarkutil stats --input=bitstream <file>.bitstream

or

  llvm-remarkutil stats -y <file>.yaml
  llvm-remarkutil stats -b <file>.bitstream

which could print out some stats/facts about the remarks as well.

That'd be pretty separate from conversion, which is why I'm somewhat inclined to keep these as suboptions versus regular flags.


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

https://reviews.llvm.org/D133646



More information about the llvm-commits mailing list