Relay currently doesn’t have an analysis pass to obtain the CallGraph which is very important for many module level analysis/optimizations, particularly for the inter-procedural optimizations such as inlining.
Inspired from what LLVM does (https://llvm.org/doxygen/CallGraph_8h.html), I have implemented a simplified version of it here
One of the questions I have is do we need to expose it to Python? I personally don’t want to because it is mainly used internally from C++ passes and the dependency_graph pass is also not exposed to Python frontend. If so, I will just add some gtest to it and later on I will add the inlining pass.
Does this sound good?