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

    <tr>
        <th>Summary</th>
        <td>
            [Flang] Stop using deprecated typed pointers
        </td>
    </tr>

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

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

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

<pre>
    LLVM fully dropped typed pointer support a while ago, but the Flang LLVM dialect lowering still generates typed pointers. This works, because MLIR's LLVM dialect supports typed and opaque pointers and just removes the types when exporting to LLVM IR.

Sadly, supporting both pointer kinds complicates a lot of logic in the dialect, including it's lowering. Thus, @zero9178 pushed on this in February 2023 and switched most (if not all) lowerings to opaque pointers (some revisions were linked bellow). If I'm not mistaken, he even attempted to migrate Flang as well, but apparently non-trivial changes will be necessary to succeed with this.

I'm mainly creating this issue because I wasn't able to find any discussion on this and because this change is long overdue.

Some revisions that moved lowerings to opaque pointers:
https://reviews.llvm.org/D143583
https://reviews.llvm.org/D143608
https://reviews.llvm.org/D143661
https://reviews.llvm.org/D143582
https://reviews.llvm.org/D143853
https://reviews.llvm.org/D143855
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyUlEGPo7gTxT-NuZQ6IiYEOHD4_7cVKVLPZWa1d2MX4Gljsy47bPbTr-yks8ocVsqFVqPiV69evZQg0pNF7Fn9f1a_FyKG2fn-XVtNwbticOraf3z88Q3GaMwVlHfrigrCNT1Xp21ADxTX1fkAArZZGwQxOcZ_gyEGCDPCyQg7QaYoLQzKAMZt6LWdgII2Bia06EVAegbTDn6fNcHm_CdlIkoRCeHbx_k74w09Q-8yviDCKnCr-DPig5ff_YwUwOPiLqnfjLmcYJvRAv6VCElYcDf4-fuOle-s_N_t-UMoc01S7s1S6eDC_PDiU1tFIN2yGi3zSAKMC-BGMG7SErTNTe-iE0pbaaJKJB3yVF_upPFjHpwdyr_Ru27ftLBGmlGBSxxNiXfCwUfhr8BLXuUZadNBpqrFUQDGWz2CdQGEMYx3jwaUxvzVI8ZbcguCx4sm7SzBhh7BaPuJCgY0xm2Mdzs4j3BmvFkyedEUxCfapHZGwAtaECHgsoaUFweLntKK72kQiZrE3GIi1lV4tMFcwTr7Fry-aGFAzsJOaTcpJAOCRYlEadLggKKUiAo2HeZsxdOibsoWoa25gvQoblvNjhFFfGTpDJsgy3gTQAwGE3nUNsXnCkqTjJRMeNid3P36NL-4aQSd1mYncBf0KuJzaJ7tDLMIkOKn_nMRrLp_Poew5v_4ifFT4uBGO2Muy875ifHT-_5Q1W31QvWxbF-pPu5fUsJfqG7rV3S3dV2ovlJd1YkC-_2xa-qqqpuumHts2mrk8oDt2GFT7pVqu1HJYRxUg1XXFrpPv499uW_Krjzuu1155N2xbg-V4FgepWSHEhehzaNrkaPSH7uqrAojBjSULyXnY0ox4zwdTd-n-rchTsQOpdEU_tVdBB1MPq8596x-hx_BrRApxVHh6jFdiV8uKhXRm_7ZkUmHOQ476RbGTwl___O2evczX5JTVkuMn7LgfwIAAP__R3f4Gg">