llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
29.44k stars 12.17k forks source link

llvm-bolt --help is missing info about -report-bad-layout option #114230

Open tvondra opened 1 month ago

tvondra commented 1 month ago

It seems llvm-bolt --help says nothing about -report-bad-layout. I only noticed because the BOLT paper mentions the option without the required uint argument, so the command was failing for me. In the end I found bolt/docs/CommandLineArgumentReference.md but --help doesn't mention the option at all.

marcauberer commented 1 month ago

The respective command line option is explicitly marked as hidden. See here:

https://github.com/llvm/llvm-project/blob/56dcfbef453d6cc390fc7a734db417e047616526/bolt/lib/Passes/BinaryPasses.cpp#L178

@maksfb is this intended?

maksfb commented 1 month ago

@maksfb is this intended?

Yes. We don't have a strong definition of the "bad" layout and this option was indeed added for the paper to easily diagnose places where the compiler can generate suboptimal layout even in the presence of a high-quality profile. It was never intended for the end user. But now you seem to find a use for it, although I'm not convinced that's really what you (or any user) need in the end.