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

    <tr>
        <th>Summary</th>
        <td>
            Allow early stopping in lifetime analysis
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            clang:analysis,
            clang:temporal-safety
      </td>
    </tr>

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

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

<pre>
    Cap the number of dataflow iterations performed by the analysis

Lifetime analysis can be stopped after a couple of iterations and we do not have to reach the fixed point.

This does introduce some inaccuracies but it would not introduce false positives. Some loans would fail to propagate to some origins meaning that our analysis would consider use of some origins safe if some expired loan did not make it the origin due to early stopping. The loans which reached would be correct as the origin set monotonically grows.

Thus the set of expired loans reaching an origin set are still correct even if incomplete.

This will save us from large compile time hits inherent to our analysis ([example](https://github.com/rust-lang/rust/issues/140454) in Polonius)
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8U82O4zYMfhr5QkzgaOLUPviQ3UFOPRTovgAt0TZbWTT0k0zevpATzCQ97MmGRH1_JDFGnjxRr5ofqvmoMKdZQp_jZ9dUg9hb_xNXSDOBz8tAAWQEiwlHJ1fgRAETi4-wUhglLGRhuG3l6NHdIkdVn1R9-pNHSrx8H4NBDwNBTLKuZAHHRAEQjOTVUWF5Akdv4UpgBbwkmPFCkAQCoZk3rpE_ycIq7NPuzvdr5ghWKAL7FMRmQxBlIWCPxuSAhinCkBNwgqtkZzfo7-IRXSRYJXLiC8Ud_F1eO0EfH_Ujsisy1iArTpg2TRuHBJ7YR1gIPfsJ0owJJIdv83cEIz6ypQA5bo5fHkccCfhxSJ8rB7IbP1i-i13wXyrySwL3V2DzpoIwuNs9WvbTDn7NX9JnNvM9ObIPGQOBkRDIJMD4jBYpwSJekng26NwNpiDX-BVxvleXMhlfNMY7RTGP_hkOQ2k5O_dFSRfyxSd7I8vqKNFzC6-lNJaG5whjkAUchqkIXlZ2BNtMzZxKn2cK5FPx_5K10q1qftAnFnTVfCjdzimtUb2flD4rfZ44zXnYGVmUPocc05tDPz3-lT5zjJmi0uf9oT40B6U7YA9_iRPPOSrdVbZ_t917hxX1-z-a5tgeu3pfzX1z7PRQj8cBdVvb-r01XXM0NTZNa8zQmYp7XeumbnW9rw-t3u-647477tuua49DPRCpQ00Lsts5d1l2EqZqU9Pvm0NTd5XDgVzcdldrs8l-P31tntZK_3y6SLSsEtC9ldlKt3LffFShL9hvQ56iOtSOY4rfbImTo_7kyra_TlXJwP1_q6scXP-bdAvu4_O2BvmHzGvAd1eXXv8XAAD__0aYmN8">