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

    <tr>
        <th>Summary</th>
        <td>
            Missing rbegin() function for BasicBlocks in llvm::Function
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            new issue
      </td>
    </tr>

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

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

<pre>
    I noticed that we no longer have public access to `BasicBlocks` in `llvm::Function` in commit ad36f767a4d183318b2e3a33dfc1b86a50ac2ab1, as well as the access to`getBasicBlockList()`. However,  LLVM16 only provides `begin()` and `end()` to iterate over BBs in the function, but there is no corresponding `rbegin()` and `rend()` to iterate in reverse order. This can be inconvenient when working with LLVM functions.

Would it be possible to add this reverse function for `BasicBlocks` to the LLVM codebase?
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJx0Us1u2zwQfBrqsoghkZYsH3SIExjfByS3oj3zZy2xobkGl7KQty-oNHGKphcSmMXuzM6OZvZjRBxEexDtY6XnPFEaRsxeR02VIfc6_A-RsrfoIE86w4IQCQLFERNM-opwmU3wFrS1yAyZQHT1QbO3h0D2hUVXg48FDOF6FupeqPvjHG32FH_XLJ3PPoN2qjvtup3euqZXqumNRKWVcifbmL7Tba2t1KYR8gE0w4IhlD9PeCMXXT1ivtE_ec5C9kLuRVdv4D9a8IqpTICnp-_PTQcUwytcEl29Qy4yDY4-fvSAjq6gGN0NywQ-Y9IZga6Y4HDgskdRcnpfTT6AmXPBEoLn4pqllJAvFJ2PYxmavuZK_yLzEVLRzwiUHKYNfJs8g9URTKlaileMHmOGZcIIC6WXQrX4PK37fsjjjagfRX3_9v6gOTjwuUy5ELM3AQuvduXqnj9Y39vhROmLO2daPViZLDk0mlGoY-UG5fZqryscmq5Xfdfs1K6aBsQW9_1pK6XuT42W29a05mQalG1reyMrP8haqrptZK2kbHabXsum02bf28ZZs6_Ftsaz9mFTwrWhNFaeecahk92uqYI2GHiNt5QRF1iLQsqS9jSUnjszjyy2dfCc-TYl-xxwePbMxb_Pd_rTg08GlOv8HfFqTmGYcr5wweVRyOPo8zSbjaWzkMe14-27uyT6iTYLeVx1spDHdY9fAQAA__8Wci-1">