<table border="1" cellspacing="0" cellpadding="8">
    <tr>
        <th>Issue</th>
        <td>
            <a href=https://github.com/llvm/llvm-project/issues/60273>60273</a>
        </td>
    </tr>

    <tr>
        <th>Summary</th>
        <td>
            Block visitation order should account for CFG loops
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:dataflow
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          ymand
      </td>
    </tr>
</table>

<pre>
    Currently, we visit blocks in topological order. While better than an arbitrary order, this fails to account for the effects of loops. Namely, that we will visit the successor of a loop before we've reached a fixpoint on a loop, potentially wasting all computation along that path, because of updates resulting from the loop.

Instead, we should use some form of hierarchical ordering, like those discussed in Bourdoncle's [Efficient chaotic iteration strategies with widenings](https://link.springer.com/chapter/10.1007/BFb0039704)](https://citeseerx.ist.psu.edu/doc_view/pid/d885e8dc100cb95bf13cc36c8f0532a3ea4960b1).
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsU82OtDYQfBrPxfqQMTA_Bw47uyHKJdcco8ZuoLPGRu5m55u3jzwz0SZSJAQS6qouV7mAmeaI2KvuqrqPA-yypNzfV4j-MCZ_79_3nDFKuCv7rm-ov4hJ9BiS-2RNUUvaUkgzOQg6ZY-50n8sFFCPKIJZywJRlyePJBny_TlV2GQh1hNQYC1Jg3Npj6KnVECocZrQCes06ZDSxpX-HVZ86pAFpIi5UQgvRQXCu3PInHIBwQOmR5xSRn1DZU9fqDOCW9Br0BP93BJF0Sm-ZgvzlgSjEIRw1zdgoThrCEG7tG67gFCZDinOTw0byFJgIzrYGcveffMgyDoj7-GBn3JaH_rKkkqZD2Xenu_fIguCf1nLS9qD14WH04rFibUwLoQZslu-PaY4F0ygT9SyJEbtid3OjL5kck179im6UA7NWnXXX6aJHGEU7RZIQk6TYH4ehyWD4EzI-kay6Bt5jBRnVt2HsudFZGPVvCk7KDsEip8Vb0UB5sqlVdnBLbBJiXSoTVUbc1J2uA6jMc3lZFplL_9H5EiQEfPPiliqjfcK_a7s4JP784vwpuywkS8_zucOz97Vxrjx0o1T3TjXHN15Ml1joUFoL0cz1speqoPvG39pLnDAvj6e2qOpz6Y7LP3Fuubcwsk1xnetQ--8a47edKepO9W-O1BvjW1MbVvb1MZ0lTPQdtOpObbHczNNoFqDK1CoQvhaq5TnAzHv2B-NPTWHACMGfrTIWhcgzqp58yAwhXRT1pZu5b5Af4z7zKo1gVj4m0xIAvbXUqvnhX5m80j7n4vx74a8D78-a3HYc-j_a-1MsuzjK5yy4fX5seX0FzpRdnhoZ2WHh_y_AwAA__8T4Fsa">