5 Commits

Author SHA1 Message Date
Justin Bogner
947695a37f
[HLSL] Update target test to use -cc1 rather than the clang driver (#127262)
This test was unnecessarily invoking `dxv` if it was in your path since
it used the driver rather than the `-cc1` command.
2025-02-14 13:16:59 -08:00
S. Bharadwaj Yadavalli
6d8901488f
[DXIL] Set DXIL Version in DXIL target triple based on shader model version (#91407)
This change set restores commit 080978dd2067d0c9ea7e229aa7696c2480d89ef1 that was reverted to address ASAN
failures and includes a fix for the ASAN failures. 

Following is the description of the change:

An earlier commit provided a way to decouple DXIL version from Shader
Model version by representing the DXIL version as `SubArch` in the DXIL
Target Triple and adding corresponding valid DXIL Arch types.
    
This change constructs DXIL target triple with DXIL version that is
deduced from Shader Model version specified in the following scenarios:
  
1. When compilation target profile is specified:
    For e.g., DXIL target triple `dxilv1.8-unknown-shader6.8-library` is
    constructed when `-T lib_6_8` is specified.
2. When DXIL target triple without DXIL version is specified:
    For e.g., DXIL target triple `dxilv1.8-pc-shadermodel6.8-library` is
    constructed when `-mtriple=dxil-pc-shadermodel6.8-library` is specified.
    
Updated relevant HLSL tests that check for target triple.
2024-05-08 12:20:41 -04:00
S. Bharadwaj Yadavalli
178ff39500
Revert "[DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version" (#91290)
Reverts llvm/llvm-project#90809

Need to investigate ASAN failures.
2024-05-06 22:21:37 -04:00
S. Bharadwaj Yadavalli
080978dd20
[DirectX][DXIL] Set DXIL Version in DXIL target triple based on shader model version (#90809)
An earlier commit provided a way to decouple DXIL version from Shader
Model version by representing the DXIL version as `SubArch` in the DXIL 
Target Triple and adding corresponding valid DXIL Arch types.

This change constructs DXIL target triple with DXIL version that is
deduced from Shader Model version specified in the following scenarios:

1. When compilation target profile is specified: 
For e.g., DXIL target triple `dxilv1.8-unknown-shader6.8-library` is
constructed when `-T lib_6_8` is specified. 
2. When DXIL target triple without DXIL version is specified:
For e.g., DXIL target triple `dxilv1.8-pc-shadermodel6.8-library` is
constructed when `-mtriple=dxil-pc-shadermodel6.8-library` is specified.

Updated relevant HLSL tests that check for target triple. 

Validated that Clang (`check-clang`) and LLVM (`check-llvm`) regression
tests pass.
2024-05-06 18:33:57 -04:00
Chris Bieneman
c5e54e2752 Add clang DirectX target support
This change adds a stub DirectX target for clang to enable targeting
dxil targets.

Reviewed By: pete

Differential Revision: https://reviews.llvm.org/D122085
2022-03-28 15:00:50 -05:00