[PATCH] D133709: -dot-machine-cfg for printing MachineFunction to a dot file
Matt Arsenault via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 13 12:41:41 PDT 2022
arsenm added inline comments.
================
Comment at: llvm/lib/CodeGen/MachineCFGPrinter.cpp:23-26
+static cl::opt<std::string>
+ MCFGFuncName("mcfg-func-name", cl::Hidden,
+ cl::desc("The name of a function (or its substring)"
+ " whose CFG is viewed/printed."));
----------------
yassingh wrote:
> yassingh wrote:
> > arsenm wrote:
> > > Could we reuse the same option names?
> > Are you suggesting to use same option names as -dot-cfg?
> I tried using the same cl option names, but it dosen't work.
> //"CommandLine Error: Option 'cfg-func-name' registered more than once! LLVM ERROR: inconsistency in registered CommandLine options "//
> I also referred /llvm/lib/Analysis/DDGPrinter.cpp which defines cl options for similar functionality eg "dot-ddg-filename-prefix" without reusing the same name.
Yes, you would have to move the options into a common place, or have both printers in the same module which may not be worth the effort
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133709/new/
https://reviews.llvm.org/D133709
More information about the llvm-commits
mailing list