[llvm] [nfc][llvm-profdata]Refactor llvm-profdata showInstrProfile (PR #71328)
Mingming Liu via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 7 09:39:15 PST 2023
minglotus-6 wrote:
The patch is currently adding new C++ structs to reduce the number of arguments.
Another option is to move option definitions (https://github.com/llvm/llvm-project/blob/45ca24edc0b9f2541efb0ae3c668ee7af82e22f4/llvm/tools/llvm-profdata/llvm-profdata.cpp#L2954-L3042) from function scope to a namespace (like `namespace show_prof{`), so the option definitions are visible to `showInstrProfile` and `showSampleProfile` (no need to pass long list of parameters) . The downside is that, not all options apply to both functions.
Thoughts about these two options?
https://github.com/llvm/llvm-project/pull/71328
More information about the llvm-commits
mailing list