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

    <tr>
        <th>Summary</th>
        <td>
            [mlir][amdgpu][nvgpu] Duplicate pass 'OptimizeSharedMemory' 
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            mlir:gpu,
            mlir:amdgpu,
            mlir:nvgpu
      </td>
    </tr>

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

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

<pre>
    Both amdgpu and nvgpu have a transform pass 'OptimizeSharedMemory'. The logic is identical modulo determining the shared memory address spaces.

We should consider merging them and parametrize the bits that differ across the implementations.

</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJyEkj-PnDAQxT-NaUaHYPi3FBR3QdtFKRIptcEDTGJj5DEr3X36aL0bnZQmjT0a-_2eR89ahNedaFDNm2rGTJ9x82H4fW46ZJM378ObjxtoZ9bjBL0b2G_3atM3Ag0x6F0WHxwcWgQUdt-OyI4_6PumA5mv5Hx4V9jl8GMjsH7lGViADe2RZ23BeXNaD4YiBcc77yvEjUCSHFzSgzYmkAjIoWeSXBWjKl4f68_7XX9aA7PfhQ0FcBTWJ8elJx86aEcx8Acl-MRRIG46guFloQB6Dl4knbE7LDnao47s979emRkq01e9zmgou7Ismh4vbbYNBsvGTH3bY9-RWVrEul9mM5t6rsplaTMesMC6qLBELOu6zZeuwKUqJ93gBTvTq7ogp9nm1t5c7sOaschJw6XF4pJZPZGVlA6isxxU9boep0JU-OWz9cjn326K6t5sxiwMd_7LdK6i6sKyRPl0jBxt-gJJ2IyqeXsSU_3gNCOM52F51pH-FzdkZ7DDFuMhqnpVeFV4XTlu55TP3im83q2f28sR_C-ao8JrmlwUXtPwfwIAAP__OufdMA">