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

    <tr>
        <th>Summary</th>
        <td>
            [flang]Data Layout available in MLIR sometimes makes code run slower
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            flang
      </td>
    </tr>

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

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

<pre>
    The main purpose of this ticket is to say "Yes this is known". 

Since this patch went in:
https://github.com/llvm/llvm-project/commit/81181089c6d835f2f506bb125bb81ab5d397e3d6

some benchmarks are now slower. 
speci-2017 548.exchange2_r - down about 10%. Seems to be something to do with how code is generated and how functions gets inlined, as there's only one function that is ~60% of the time [on my platform] without DL, and three different functions, including main, that are the heavy hitter in the case with DL. 

spec-2017 527.cam4_r - down something like 30% in my measurements. There is no obvious hot-spot, but suspect variations in inlining/code-generation here too, as the code is also longer in the slower case.
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyVU0-v2zYM_zT2hYhhybHjHHzolhUokF7WXnYaaIuOtchSIMl5y7cfpbzmrccChiyJBPn7Q41OPYbvC8GK2sJt8zcXCNwMcdEBop6uFCHtHAR8QCHlXxSeQf6u1r1ZvqugqE9F_em5ftN2omfODeO0wBtZLmKL5j1hifEW0kl-5u-i47KN1eRWPhhz__Hb3bz7h6bIR46tOm16IXpR98epU33TznJu624chWzHsRc4tqo5HqhR3f_hBLcSjGSnZUV_DYCegHFDMO6N_A_o4UaT3slaHKDd9xX9Oy1oLyT_9rADxTQBR7dFEHUh2wq-Ea1ZlZEgNWC29pLOysEbE4KFO0xOUZLpQpY8RlKAVuXIvNkpamdTLLKU1mhLqpC_AyZ1yVMhDwGcNQ9e6JXPMcx-FIc_uoTkaRWrrZlk0f7GKesDbgbj7PxatKeMJgE_nXN5BhAXTwRKzzP3YWdeYFICe2c2lcikiUg3uWUSLfVZCO8PWHSM5Dk3303II5NJn84_T0IS9V1TeagmXPcfcn6oZvSVoMlsdIa_EobN08rgQgXfkxyJs3Xgxrt2W2AN4y7cXEz4RiYXttQqwh29xqewXCrLyh3yBCnavfuQdMw1o3Mfkr_cQhMcGMfmvxg-RyUTrUoaRNcd2r4Vzb5UQ6OOzRHLqKOhgR2YDc8NC3_CiHDGR9Ie76gNjoZSwa_nL38-2bNngWW-8pqb-82-tyo3b4ZffiY6hI3Yxc9t34tDuQx1S1gL1akjzzTKQ7evBWLdye44t7MYSwZFJiTY_IqfyKVk8KUeZC2lEPVe9HXb7CtSo5iolyiaWmK_L_Y18YSYKmGonL-Ufshwxu0SOGh0YPNeQQxBXyxlhVJ93Hgq_XCmm_M4oeVJmLZQZgZDhv8fsnKFbg">