Adding pass options to categories to simplify opt -help output

I find opt -help output to be a little hard to grok, and have to look at the actually cpp file to figure out which options are valid for a particular pass.

So, I’d like to add them to pass specific cl::OptionCategory’s to simplify the output. Something like this – just picked -function-import as an example:

function-import options:

-compute-dead - Compute dead symbols
-enable-import-metadata - Enable import metadata like ‘thinlto_src_module’
-import-all-index - Import all external functions in index.
-import-cold-multiplier= - Multiply the import-instr-limit threshold for cold callsites
-import-critical-multiplier= - Multiply the import-instr-limit threshold for critical callsites
-import-cutoff= - Only import first N functions if N>=0 (default -1)
-import-hot-evolution-factor= - As we import functions called from hot callsite, multiply the import-instr-limit threshold by this factor before processing newly imported
functions
-import-hot-multiplier= - Multiply the import-instr-limit threshold for hot callsites
-import-instr-evolution-factor= - As we import functions, multiply the import-instr-limit threshold by this factor before processing newly imported functions
-import-instr-limit= - Only import functions with less than N instructions
-print-import-failures - Print information for functions rejected for importing
-print-imports - Print imported functions
-summary-file= - The summary file to use for function importing.

If there are no objections, I’ll create a patch.

thanks…
don