<table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Issue</th>
<td>
<a href=https://github.com/llvm/llvm-project/issues/117761>117761</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>
[DirectX] Avoid marking DXIL ops as internal in DXILFinalizeLinkage
</td>
</tr>
<tr>
<th>Labels</th>
<td>
backend:DirectX
</td>
</tr>
<tr>
<th>Assignees</th>
<td>
</td>
</tr>
<tr>
<th>Reporter</th>
<td>
bogner
</td>
</tr>
</table>
<pre>
Currently, we're ending up with the DXIL ops we declare and use as being internal, like so:
```llvm
declare internal %dx.types.ResRet.f32 @dx.op.bufferLoad.f32(i32, %dx.types.Handle, i32, i32)
```
This fails validation and is generally incorrect.
There are two ways to fix this:
1. Run DXILFinalizeLinkage earlier so that it doesn't internalize these symbols
2. Teach DXILFinalizeLinkage to ignore these symbols
Option (1) is trivial to do and is sufficient, but (2) shouldn't really be much harder. The decision is mostly a matter of deciding what we think is more "correct".
</pre>
<img width="1px" height="1px" alt="" src="http://email.email.llvm.org/o/eJxsk0GPozgQhX-NuZQGgYEQDhyyHUW7Uksrtfow1zIuoDbGjmyTdObXr0w6M7ualhBGNq9c79MrDIEnS9SL5g_RHDNc4-x8r9xkyWfK6Xv_snpPNpq7kC9wIyFbT0BWs51gvcCN4wxxJjh-_-sV3CXAjUDTYNAToNWwBgIMoCgJ2EbyFk2qZfhMEJyoDqI4iF3xeIy5LqI4PCs8BSBkoz_yeL9QyN8ovFHMx0qCqAv9kbtLrtZxJP_qUKd9Ifec3i__0_2JVhtKu5-H29L99_r0XRzeZw4wIpsAVzSsMbKzmxsOMJElj8bcge3gvKch5k8ZJdOeIN4c3PAeIDoY-QPizOFhtMzhbbUbrRNbNPyDXtmecSIg9IbJQ3AQZ4zAEbSjYIVs408Q_IMS7kAQ7otyJojiIHN4JxzmL6tGBzxZ53-XieLw92VzJuS-FLJL7qLnK6NJMu2elsM6jjww2ZioqTUmRUIHYXar0Y8WPW1UFMGyDjPM6DX5HN7nLRAc0k0cYHEhmjsgLBgjeXDjdrwF6pZ831KrbM-Pnz2BkPITtJAyz3Rf6a7qMKO-bCu5q5t612VzX-1VW1UN7UnSnpB2qmubsasVNrpu633GvSxkXZZyV-5lLbtctdVYYlNURTdWO4WiLmhBNnlKYe78lHEIK_Vl2ba7MjOoyIRtVqRUOJzJalEdjpxa-y6kTCPk-yT-ptYpiLowHGL4VS5yNNuwPTXNEQ5XxxoW9OdE4OcYYfgVfv4yMNnqTT_HeNmiJU9CniaO86rywS1CnrZReizfLt79s_E7bY6CkKdPU9de_hsAAP__q9BRnw">