[PATCH] D34790: [NewPM] Add Clang cc1 flag -fdebug-pass-manager for printing debug information.

Tim Shen via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jun 29 15:38:31 PDT 2017

timshen marked 2 inline comments as done.
timshen added inline comments.

Comment at: clang/include/clang/Driver/Options.td:971-973
+def fexperimental_new_pass_manager_EQ : Joined<["-"], "fexperimental-new-pass-manager=">,
+  Group<f_clang_Group>, Flags<[CC1Option]>,
+  HelpText<"Enables an experimental new pass manager in LLVM.">, Values<"on,off,debug">;
timshen wrote:
> chandlerc wrote:
> > I don't think we want to expose this flag in the driver -- it should really be a CC1-only thing for debugging.
> > 
> > As such, I think I'd just make it an independent flag:
> > 
> >   -fexperimental-new-pass-manager-debug-logging
> > 
> > Or some such. This also seems easier than having to define a new kind.
> The two small disadvantages of your suggestion is that
> 1) It's more verbose to type: `clang -fexperimental-new-pass-manager -fexperimental-new-pass-manager-debug-logging`
> 2) it's the 3 states vs 4 states pattern: `clang -fno-experimental-new-pass-manager -fexperimental-new-pass-manager-debug-logging` doesn't make sense to me, and it's good to avoid that.
> What do you think about these trade offs?
As discussed offline, (2) isn't a practical issue, and (1) makes sense since -fexperimental-new-pass-manager will ultimately go away, but the debug flag remains. 


More information about the cfe-commits mailing list