Returns the maximum loop nesting depth from which |function_id| can be called. This is computed inter-procedurally (i.e. if main calls A from depth 2 and A calls B from depth 1, the result will be 3 for A). This is a static analysis, so it's not necessarily true that the depth returned can actually be reached at runtime.
| 58 | // This is a static analysis, so it's not necessarily true that the depth |
| 59 | // returned can actually be reached at runtime. |
| 60 | uint32_t GetMaxCallNestingDepth(uint32_t function_id) const { |
| 61 | return function_max_loop_nesting_depth_.at(function_id); |
| 62 | } |
| 63 | |
| 64 | private: |
| 65 | // Computes |call_graph_edges_| and |function_in_degree_|. For each pair (A, |