How to generate some tree like graph describing the IRs?

Hi, I was looking for some tools to generate the tree-like graph representing IRs like this.

Say, I have generated an IR file, and I just pick one value, and the tool can trace the use-def chain and automatically generate a tree-like graph (maybe save it as an svg) for me, so I can better understanding the logic of the IR code.
Or maybe generate the whole tree-like graph for the entire IR, then I can navigate through it.
I kinda know that mlir::getBackwardSlice API can get the defs for one operation, and think that this might be a start to build the tool, but is the tool already available? Thanks.
(The picture below is manually cut and pieced together one by one by me.)

Hi, I think this could help: MLIR: lib/Transforms/ViewOpGraph.cpp Source File