slyubomirsky opened a new pull request, #14149:
URL: https://github.com/apache/tvm/pull/14149

   This PR adds an analysis that constructs a Relax dependency graph in a 
module (which global functions call which other global functions) and detects 
recursive functions, both simple recursion and mutual recursion. Simple 
recursion is a self-cycle in the dependency graph and mutual recursion is a 
directed cycle. The analysis works by using [Johnson's algorithm for detecting 
elementary 
circuits](https://www.cs.tufts.edu/comp/150GA/homeworks/hw1/Johnson%2075.PDF) 
(directed cycles where each node is visited at most once) in the dependency 
graph and then coalescing all elementary circuits that have at least one node 
in common to form groups of mutually recursive functions. This can be useful 
for future passes that need special handling for recursion or mutual recursion.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to