Print out callgraph of a specific entry point
Allows us to generate / print out a callgraph for a specific entry point which we'd like to focus on.
Sample usage: wasm-opt foobar.wasm --print-call-graph -pa=callgraph-entry@foo > foo.dot
It looks like we don't have a test for this pass. If you want to extend it then I suggest we first land a PR that adds a test for the old functionality. Then this PR can land later, and the test will show nothing regressed.
I found it useful for my use case and was sharing in the case where others will be able to benefit from it as well. If there's not much traction on this, I'll probably leave it as is. But I do agree with adding a tests for old functionality on it! I'll see if I can work on that.
If there's not much traction on this, I'll probably leave it as is.
I do think this can be useful! My comments weren't meant to discourage you, but just to explain how I think it best to proceed to get this landed.
It's probably also fine to add a test in this PR for both cases, as the pass is simple enough.