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

    <tr>
        <th>Summary</th>
        <td>
            How to get all fine grained optimization options of the LLVM optimizer opt -Ox (O1/O2/Os/O3...)
        </td>
    </tr>

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

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

    <tr>
      <th>Reporter</th>
      <td>
          cpython-java
      </td>
    </tr>
</table>

<pre>
    I found an opt-Ox bug, but I don't know which optimization step is causing the bug, in order to figure this out, I need to know all the fine-grained optimization options for opt-Ox, and then verify which optimization step the bug is in by trying to disable some of the fine-grained options.

I tried one way:

opt -Ox -debug -debug-pass=Arguments

However, this command does not work with all versions of opt, for some versions of opt it will report errors, and even for versions that do not report errors, I am not sure whether the output of this command is all optimization options and does not include non-optimization necessary execution options.

Hope a friend can help me!
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJx8U0GTszYM_TXmooEBE0Jy4JD2m8yXme3srXeDBXgXLMYWYdNf37GTtLvtthc8WHrye0-S8t4MFrER1S-i-pGolUdyTbfceCSbvqmrSlrSt-YCPa1Wg7JAC6evH9Cug5C_QrsyXECTFbJmeLe0wTaabgxpZjZ_KDZkwTMuYDx0avXGDsAjPgsYC-Q0OmCC3gyrQ-DReKCVQ_gCFlGHYKytpimCe2MxHZwyFvXXp8IPWQ89uQfVUEZZHXAWruhMf_tPjg9igaux0N6A3S0SJtDGq3ZC8DQjUP89DbI-E_lJ5KcLsDPh1iJs6ibK0_2eFobgX6oxPHQ_0kV5L8ofJzesM1r299yftOEVXRAQPelonoMSTejBEsNG7h02w2M05orOR-3UBzIBFlyIhP8RA8OwmWkChws5BnSOnH86hVe0EfoXikfFoCk--i_IBdQcIz50bxuRx9DPEUMTl5Xvbn3ib3zk-23fvugztptWjWDJpl-yLXbovXI3wA_s1s8Vsqd3C4KC3hm0GjplYcRpgRmFLBLdlPpYHlWCTVHvirrK90WdjI2Uuar3xaHYl71UO7kvZC_37bGuK9W3uk5MI3NZ5WUh87LcV3VWFUrmu_JYHPQRu6ITuxxnZaZsmq5zRm5IjPcrNkWZHw5VMqkWJx_XTUqLG8SokDJsn2sCKG3XwYtdPhnP_u8ybHjC5idtYRYH5OhgmD_43zV4DOrLy--_PRMwLkYcQiEPr4WQ51cZPj58yizLhDwmq5uakXnxYXLlWcjzYHhc26yjWchz4PU40sXRG3Ys5DmqCWUecq-N_DMAAP__e3uBHg">