This adds llvm-remarkutil. This is intended to be a general tool for doing stuff with/to remark files. This patch gives it the following powers: * `bitstream2yaml` - To convert bitstream remarks to YAML * `yaml2bitstream` - To convert YAML remarks to bitstream remarks These are both implemented as subcommands, like `llvm-remarkutil bitstream2yaml <input_file> -o -` I ran into an issue where I had some bitstream remarks coming from CI, and I wanted to be able to do stuff with them (e.g. visualize them). But then I noticed we didn't have any tooling for doing that, so I decided to write this thing. Being able to output YAML as a start seemed like a good idea, since it would allow people to reuse any tooling they may have written based around YAML remarks. Hopefully it can grow into a more featureful remark utility. :) Currently there are is an outstanding performance issue (see the TODO) with the bitstream2yaml case. I decided that I'd keep the tool small to start with and have the yaml2bitstream and bitstream2yaml cases be symmetric. Also I moved the remarks documentation to its own header because it seems a little out of place with "basic commands" and "developer tools"; it's really kind of its own thing. Differential Revision: https://reviews.llvm.org/D133646
16 lines
331 B
Plaintext
16 lines
331 B
Plaintext
--- !Analysis
|
|
Name: StackSize
|
|
Function: func0
|
|
Args:
|
|
- NumStackBytes: '1'
|
|
- String: ' stack bytes in function'
|
|
...
|
|
--- !Analysis
|
|
Pass: asm-printer
|
|
Name: InstructionCount
|
|
Function: func0
|
|
Args:
|
|
- NumInstructions: '1'
|
|
- String: ' instructions in function'
|
|
...
|