[Discuss] CallGraph support in Relay

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?

@tqchen @jroesch @MarisaKirisame @haichen

As a part of design principle(first class python support), it would be great if the result of the callgraph data structure can be part of the object system and exposable to py(as a result). The intermediate data structures does not have to be exposed though

Okay, that sounds good me as well. Will update it.