llvm-project icon indicating copy to clipboard operation
llvm-project copied to clipboard

[llvm-stress] argument "--color" has no effect

Open kernelwernel opened this issue 1 year ago • 2 comments

I was playing around with llvm-stress and the --color argument doesn't seem to work, the output is still black and white with no color highlighting. ANSI colors work on my terminal for the record.

kernelwernel avatar May 22 '25 04:05 kernelwernel

@kernelwernel, The llvm-stress tool does not have colors directly baked in. However, I looked at the code and it shouldn't be too bad to insert some hooks. Since this will be something with fine-grain control, maybe you can elaborate on what type of color scheming you'd be interested in, and I can implement the patch for it. Thanks.

snarang181 avatar May 30 '25 02:05 snarang181

@kernelwernel, The llvm-stress tool does not have colors directly baked in. However, I looked at the code and it shouldn't be too bad to insert some hooks. Since this will be something with fine-grain control, maybe you can elaborate on what type of color scheming you'd be interested in, and I can implement the patch for it. Thanks.

Thanks for the reply!

Not exactly sure what kind of color scheme would fit well. I made this issue with the intention to notify the devs about the unimplemented argument, instead of suggesting what the change should be.

But if I had to pull any ideas, there's a vscode extension called LLVM Assembly Language that I use (extension ID: voidc.llvm-asm), which looks like this:

Image

logical operators: white brackets, parentheses, and commas: white variables: cyan type extensions and operators (e.g. zeroinitializer, ult): blue instructions: dark blue constants: light green functions: yellow types: green comments: grey strings: orange branch labels: white (not sure, maybe there's a better option)

That's my personal opinion on what I'd imagine the styling could be like, but that's obviously subjective.

If you need any help, I can provide some support for the patch (although I'm not entirely familiar with the LLVM codebase so I'm not sure how effective I'd be). But still, let me know if there's anything you'd like to know or for me to do.

Again, thanks for your time.

kernelwernel avatar May 30 '25 13:05 kernelwernel