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

    <tr>
        <th>Summary</th>
        <td>
            [HLSL][SPIRV] Add a `KHR` special option to `spirv-ext` CLI option
        </td>
    </tr>

    <tr>
      <th>Labels</th>
      <td>
            HLSL,
            backend:SPIR-V
      </td>
    </tr>

    <tr>
      <th>Assignees</th>
      <td>
            s-perron
      </td>
    </tr>

    <tr>
      <th>Reporter</th>
      <td>
          s-perron
      </td>
    </tr>
</table>

<pre>
    In DXC, there is an options to limit the extension to just the KHR options: `-fspv-extension=KHR`. We would like to add the same to `spirv-ext` to make it easier to be backwards compatible with DXC.

This can be implemented using a special value in SPIRVExtensionsParser::parse like "all". Then it can traverse the `SPIRVExtensionMap` to add all entries that start with "SPV_KHR".
</pre>
<img width="1" height="1" alt="" src="http://email.email.llvm.org/o/eJxsUtFuqzgU_JrDy1GQOQYSHnigyUat2pWqturu28rAaXBrDLJNuvfvr0zSXl3pPgHjYZgZRnmvT5a5huIGiPxmZucmC0RQHBK1hGFy9ReatFP_o76zePh3D7THMLBj1B6VxWkOerIew4RGjzrEQ-T_A1uvJxvh98Vf0Pvbpy86yAahFJs3P58332yQh_vbJyhFiv8wfk6L6dHoD44qqu9XEa_G9RlK4Wft1rehFBEa1QejDsjKa3YRaRlb1X18Ktd77KZxVkG3hvFThyGGSUE0IJqXQXvslI18Pc6GR7aBe1y8tidU6GfutDJ4VmZh1BafH--eXv_6su0flfPsQDYgmzneX1wDkTIGiFJ8GdhGa_EjwakzR1KMA6X4XexvNV_jxMTKGGQbnGaPYVABfVAuXPwD0fPj63-xMaI06WvZV7JSCdfZNi92RZ5TlQz1NmO5ozZruetEIbs-Z1mJohdlRuXuTSa6JkGFyGmXFVLmVVoJykrZim3BFVEpIRc8Km1SY85jOrlTor1fuM7ktixEYlTLxl-HdPvw_BBHRHsgit2z7UE2MePm9bouV0ehTbucPOTCaB_8L-mgg1lXuSoVByhu1oKgOGATG4mVXVby_V8uo_rTKvYPd9fTZHGmHkKY4_aAjkDHkw7D0qbdNAIdo4HrZTO76Z27AHRcg3qg4zXruaafAQAA__8tWwlu">