[PATCH] D133709: -dot-machine-cfg for printing MachineFunction to a dot file

Yashwant Singh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 16 08:35:01 PDT 2022


yassingh added a comment.

In D133709#3795640 <https://reviews.llvm.org/D133709#3795640>, @arsenm wrote:

> Latest patch seems to have dropped the base patch

Yes accidently overwrote the patch, updating patch with full diff



================
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."));
----------------
arsenm wrote:
> 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
> 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