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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL] Strip resource global variables from module
        </td>
    </tr>

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

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

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

<pre>
    Global variables that represent shader resources should be stripped from the final DXIL module.

For example in this [simple shader](https://godbolt.org/z/eK4K71r1s) these global declarations should be removed.

```
@"?In@@3V?$RWBuffer@H@hlsl@@A" = global %"class.hlsl::RWBuffer" zeroinitializer, align 4, !dbg !0
@"?Out@@3V?$RWBuffer@H@hlsl@@A" = global %"class.hlsl::RWBuffer" zeroinitializer, align 4, !dbg !29
```
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJzEU82OnDAMfhpziXYUnDDMHDjMFtFd7UqVulLbawADaQMZxWHa7tNXwP608wKVEHYcO98X57Nhtv1EVEB2C1mZmDkOPhQD_fDRJLVvfxcfna-NExcTrKkdsYiDiSLQORDTFAUPpqUgArGfQ0MsePCza0VNgmOw5zO1ogt-FHEg0dnJOFF-u38Uo29nRzuQJcjT9q98EPTLjGdHwk4iDpYFZLds18gGBFkJeBhiPDOoE2AFWPW-rb2LOx96wOoZsKIH_ZCnIWXA4wLMJPrtHi01zgQTrZ_-phpo9Bdq_6EDe_nybUstARFUdT8trpbqC6gKUH_-ejt3HQXQ8g60HBy7LeEEiAJU-YoNmAFi4wzzbs1SJ1Cnt3JE8UzB28lGa5x9XkIfhHG2n4ReXMC0rfvFXFP6NMf_zgmPV21L2kK1R3U0CRVpjmqfI0pMhuJwSLXJj_tcYbo31Oxrwq4jTV2dy0ybxBYoUctDqjHNpMRd3h1RIeZNg017OCjQkkZj3c65y7i8e2KZZypSqTFPE2dqcryKGnGin2LdXVqVlUkolqKbeu4ZtHSWI78fE2106zTcPT49QlaKp0XDb-p-7dr7NKzS3rSczMEVV8q0cZjrXeNHwGoBeTE35-C_UxMBq5UaA1Yv3C8F_gkAAP__SYUZNw">