Right now, I am fairly certain that our dynamic call path analysis will get stuck in an infinite loop if there is recursion involving the function that contains the forall.
To avoid this, we can do a quick pass over the call graph using a Depth First Search (DFS) to detect cycles. If we find a cycle, it means there is recursion. At this point, we stop the search and invalidate all forall loops in the function that were optimized.
Right now, I am fairly certain that our dynamic call path analysis will get stuck in an infinite loop if there is recursion involving the function that contains the
forall
.To avoid this, we can do a quick pass over the call graph using a Depth First Search (DFS) to detect cycles. If we find a cycle, it means there is recursion. At this point, we stop the search and invalidate all
forall
loops in the function that were optimized.