[PATCH] D138456: Add new option choices for print-changed that do not output llc changes.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 27 20:48:39 PST 2022


MaskRay added inline comments.


================
Comment at: llvm/include/llvm/IR/PrintPasses.h:37
+  OptDotCfgVerbose,
+  OptDotCfgQuiet
 };
----------------
jamieschmeiser wrote:
> aeubanks wrote:
> > MaskRay wrote:
> > > The number of modes is massive. Shall we use another option to indicate the intent (only show non-codegen passes)?
> > agreed, this is growing exponentially because it really should be multiple flags
> > 
> > something like
> > `print-changed`
> > `print-changed-diff[=color]`
> > `print-ir-pass-changed` (default true)
> > `print-mir-pass-changed` (default true)
> > `print-dotcfg`
> > `print-changed-verbose` (affects all change printers)
> > ...
> > 
> > this will allow users to specify more than one change printer at once which I think is fine (could manually error out if not desired, but I don't think that's necessary)
> My first thought was to change the llc versions to print-llc-changed but I didn't want to propose changing a functionality that others may want (ie, having both come out with one option).  I think having the two piggy-back on the same option is too much.  The filtering options can be overloaded.  What about the following?
> print-changed[=diff|=cdiff] (both)
> print-ir-changed[=diff|=cdiff]
> print-mir-changed[=diff|=cdiff]
> print-dotcfg
> print-changed-verbose (defaults to false, affects all change printers)
> 
> The print-changed-verbose default could also be controlled by an environment variable 
> ```
> __LLVM_PRINT_CHANGED_VERBOSE_DEFAULT__==TRUE
> ``` 
> (is there precedence?, better name?) 
An environment variable for a debugging feature is too much. Users should know that the functionality is unstable like any other API, and perhaps more unstable since this is a debugging feature.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D138456/new/

https://reviews.llvm.org/D138456



More information about the llvm-commits mailing list