[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
Tue Sep 13 10:36:49 PDT 2022


yassingh 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:
> 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. 


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