/llvm-project/llvm/docs/DirectX/ |
H A D | DXILArchitecture.rst | 2 Architecture and Design of DXIL Support in LLVM 15 <https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst>`_, 16 or DXIL. DXIL is essentially LLVM 3.7 era bitcode with some 20 LLVM's implementation philosophy for DXIL support is to treat DXIL as 21 merely a representation format as much as possible. When reading DXIL, 23 possible. Similarly, we should introduce DXIL-specific constructs as 26 There are three places to look for DXIL related code in LLVM: The 27 `DirectX` backend, for writing DXIL; The `DXILUpgrade` pass, for 35 and writing DXIL in order to avoid code duplication. While we don't 38 values that must stay fixed to match DXIL's ABI can be found in [all …]
|
H A D | DXILOpTableGenDesign.rst | 2 Specification of DXIL Operations using TableGen Representation 14 encapsulates, among other information, various DXIL Operations in 16 DXIL Operations are represented in one of the following `two ways 17 <https://github.com/microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst#operations>`_: 27 Following is the complete list of properties of DXIL Ops with the corresponding field name 28 as used in ``hctdb.py``. A DXIL Op is represented by a set of associated properties. These 29 are consumed in DXIL backend passes as well as in other usage scenarios such as validation, 30 DXIL reader, etc. 32 A. Properties consumed in DXIL backend passes 40 This string is an integral part of the DXIL O [all...] |
/llvm-project/clang/test/SemaHLSL/BuiltIns/ |
H A D | half-float-only-errors.hlsl | 1 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_acos 2 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_asin 3 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_atan 4 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_ceil 5 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_cos 6 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_cosh 7 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_exp 8 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_exp2 9 // RUN: %clang_cc1 -finclude-default-header -triple dxil-pc-shadermodel6.6-library %s -fnative-half-type -emit-llvm-only -disable-llvm-passes -verify -DTEST_FUNC=__builtin_elementwise_floor 10 // RUN: %clang_cc1 -finclude-default-header -triple dxil [all...] |
/llvm-project/clang/test/Driver/ |
H A D | hlsl-lang-targets.hlsl | 5 // RUN: %clang -target dxil--shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --check-prefi… 6 // RUN: %clang -target dxil-unknown-shadermodel6.2-pixel %s -S -o /dev/null 2>&1 | FileCheck --chec… 7 // RUN: %clang -target dxil--shadermodel6.2-library %s -S -o /dev/null 2>&1 | FileCheck --check-pre… 8 // RUN: %clang -target dxil-unknown-shadermodel6.2-library %s -S -o /dev/null 2>&1 | FileCheck --ch… 12 // RUN: not %clang -target dxil %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-NO-OS %s 16 // RUN: not %clang -target dxil--linux %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-BAD… 17 // RUN: not %clang -target dxil--win32 %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-BAD… 18 // RUN: not %clang -target dxil--unknown %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK-B… 19 // RUN: not %clang -target dxil--invalidos %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHECK… 23 // RUN: not %clang -target dxil--shadermodel %s -S -o /dev/null 2>&1 | FileCheck --check-prefix=CHE… [all …]
|
/llvm-project/llvm/utils/TableGen/ |
H A D | DXILEmitter.cpp | 1 //===- DXILEmitter.cpp - DXIL operation Emitter ---------------------------===// 9 // DXILEmitter uses the descriptions of DXIL operation to construct enum and 10 // helper functions for DXIL operation. 31 using namespace llvm::dxil; 50 std::string OpName; // name of DXIL operation 51 int OpCode; // ID of DXIL operation 103 /// Construct an object using the DXIL Operation records specified in getParameterKind() 104 /// in DXIL.td. This serves as the single source of reference of in getParameterKind() 107 // \param R Object representing TableGen record of a DXIL Operation 149 // Sort records in ascending order of DXIL versio in DXILOperationDesc() [all...] |
/llvm-project/clang/test/Preprocessor/ |
H A D | predefined-macros-hlsl.hlsl | 1 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-amplification | FileCheck -match-full-lines %s --check-prefixes=CHECK,AMPLIFICATION,NOHALF 2 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-compute | FileCheck -match-full-lines %s --check-prefixes=CHECK,COMPUTE,NOHALF 3 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-domain | FileCheck -match-full-lines %s --check-prefixes=CHECK,DOMAIN,NOHALF 4 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-geometry | FileCheck -match-full-lines %s --check-prefixes=CHECK,GEOMETRY,NOHALF 5 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-hull | FileCheck -match-full-lines %s --check-prefixes=CHECK,HULL,NOHALF 6 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-library | FileCheck -match-full-lines %s --check-prefixes=CHECK,LIBRARY,NOHALF 7 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-mesh | FileCheck -match-full-lines %s --check-prefixes=CHECK,MESH,NOHALF 8 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-pixel | FileCheck -match-full-lines %s --check-prefixes=CHECK,PIXEL,NOHALF 9 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil-pc-shadermodel6.0-vertex | FileCheck -match-full-lines %s --check-prefixes=CHECK,VERTEX,NOHALF 10 // RUN: %clang_cc1 %s -E -dM -o - -triple dxil [all...] |
/llvm-project/llvm/test/CodeGen/DirectX/ |
H A D | embed-dxil.ll | 1 ; RUN: opt %s -dxil-embed -S -o - | FileCheck %s 3 target triple = "dxil-unknown-shadermodel6.5-library" 5 ; Make sure triple is restored after updated to dxil. 6 ; CHECK:target triple = "dxil-unknown-shadermodel6.5-library" 13 ; CHECK: @dx.dxil = private constant [[BC_TYPE:\[[0-9]+ x i8\]]] c"BC\C0\DE{{[^"]+}}", section "DXI… 15 ; The dxil global should be the first here because we generate it before the 17 ; CHECK: @llvm.compiler.used = appending global {{\[[0-9]+ x ptr\]}} [ptr @dx.dxil 35 ; In verifying the DXIL part, this test captures the size of the part, and 36 ; derives the program header and dxil size fields from the part's size. 38 ; DXC: - Name: DXIL [all …]
|
/llvm-project/llvm/lib/Target/DirectX/ |
H A D | DXILTranslateMetadata.cpp | 1 //===- DXILTranslateMetadata.cpp - Pass to emit DXIL metadata -------------===// 36 using namespace llvm::dxil; in getAnalysisUsage() 79 const dxil::Resources &MDResources) { 147 llvm_unreachable("Unsupported environment for DXIL generation."); 260 // Set validator version obtained from DXIL Metadata Analysis pass 404 const dxil::Resources &MDResources = MAM.getResult<DXILResourceMDAnalysis>(M); 406 const dxil::ModuleMetadataInfo MMDI = MAM.getResult<DXILMetadataAnalysis>(M); 420 StringRef getPassName() const override { return "DXIL Translate Metadata"; } 439 const dxil::Resources &MDResources = 443 dxil [all...] |
H A D | DXILOpBuilder.h | 9 /// \file This file contains class to help build DXIL op functions. 31 namespace dxil { in DXILOpBuilder() 39 /// Create a call instruction for the given DXIL op. The arguments 41 CallInst *createOp(dxil::OpCode Op, ArrayRef<Value *> Args, 44 /// Try to create a call instruction for the given DXIL op. Fails if the 46 Expected<CallInst *> tryCreateOp(dxil::OpCode Op, ArrayRef<Value *> Args, 61 uint32_t SpaceID, dxil::ResourceClass RC); 66 static const char *getOpCodeName(dxil::OpCode DXILOp); 69 /// Gets a specific overload type of the function for the given DXIL op. If 71 FunctionType *getOpFunctionType(dxil [all...] |
H A D | DXILStubs.td | 1 // DXIL doesn't actually use registers, but this gets the boilerplate code 3 let Namespace = "dxil" in { 4 def DXIL : Register<"dxil">; 5 def DXILClass : RegisterClass<"dxil", [i32], 32, (add DXIL)>; 9 let Namespace = "dxil"; 10 let DecoderNamespace = "dxil";
|
H A D | DirectX.h | 20 /// Initializer for dxil writer pass 23 /// Initializer for dxil embedder pass 26 /// Initializer for DXIL-prepare 29 /// Pass to convert modules into DXIL-compatable modules 32 /// Initializer for DXIL Intrinsic Expansion 35 /// Pass to expand intrinsic operations that lack DXIL opCodes 38 /// Initializer for DXIL Data Scalarization Pass 41 /// Pass to scalarize llvm global data into a DXIL legal form 44 /// Initializer for DXIL Array Flatten Pass 47 /// Pass to flatten arrays into a one dimensional DXIL lega [all...] |
H A D | DXILResource.h | 1 //===- DXILResource.h - DXIL Resource helper objects ----------------------===// 9 /// \file This file contains helper objects for working with DXIL Resources. 28 namespace dxil { 44 static StringRef getKindName(dxil::ResourceKind Kind); 45 static void printKind(dxil::ResourceKind Kind, unsigned Alignment, 49 static StringRef getElementTypeName(dxil::ElementType CompType); 50 static void printElementType(dxil::ResourceKind Kind, 51 dxil::ElementType CompType, unsigned Alignment, 56 std::optional<dxil::ElementType> ElementType; 58 // The value ordering of this enumeration is part of the DXIL AB [all...] |
H A D | DXILResourceAnalysis.cpp | 1 //===- DXILResourceAnalysis.cpp - DXIL Resource analysis-------------------===// 9 /// \file This file contains Analysis for information about DXIL resources. 19 #define DEBUG_TYPE "dxil-resource-analysis" 21 dxil::Resources DXILResourceMDAnalysis::run(Module &M, in run() 23 dxil::Resources R; in run() 32 "DXIL resource Information", true, true) in run() 34 "DXIL resource Information", true, true) in run()
|
H A D | DXILOpBuilder.cpp | 9 /// \file This file contains class to help build DXIL op functions. 20 using namespace llvm::dxil; 148 dxil::OpCode OpCode; in constructOverloadName() 151 dxil::OpCodeClass OpCodeClass; in constructOverloadName() 317 "Shader Kind Not Found - Invalid DXIL Environment Specified"); in getOverloadTy() 321 getArgTypesFromOpParamTypes(ArrayRef<dxil::OpParamType> Types, in getOverloadTy() 325 for (dxil::OpParamType Ty : Types) in getOverloadTy() 330 /// Construct DXIL function type. This is the type of a function with in getOpCodeName() 334 static FunctionType *getDXILOpFunctionType(dxil::OpCode OpCode, 351 /// DXIL versio 253 namespace dxil { global() namespace [all...] |
H A D | DXILResourceAnalysis.h | 1 //===- DXILResourceAnalysis.h - DXIL Resource analysis-------------------===// 9 /// \file This file contains Analysis for information about DXIL resources. 29 typedef dxil::Resources Result; 30 dxil::Resources run(Module &M, ModuleAnalysisManager &AM); 33 /// The legacy pass manager's analysis pass to compute DXIL resource 36 dxil::Resources Resources; 43 dxil::Resources &getDXILResource() { return Resources; } 44 const dxil::Resources &getDXILResource() const { return Resources; }
|
H A D | DXILPrettyPrinter.cpp | 1 //===- DXILPrettyPrinter.cpp - Print resources for textual DXIL -----------===// 23 static StringRef getRCName(dxil::ResourceClass RC) { 25 case dxil::ResourceClass::SRV: 27 case dxil::ResourceClass::UAV: 29 case dxil::ResourceClass::CBuffer: in DXILPrettyPrinter() 31 case dxil::ResourceClass::Sampler: in DXILPrettyPrinter() 37 static StringRef getRCPrefix(dxil::ResourceClass RC) { in getPassName() 39 case dxil::ResourceClass::SRV: in getPassName() 41 case dxil::ResourceClass::UAV: 43 case dxil in getAnalysisUsage() [all...] |
H A D | DXIL.td | 1 //- DXIL.td - Describe DXIL operation -------------------------*- tablegen -*-// 10 /// This is a target description file for DXIL operations. 22 // Valid DXIL Version records 242 // It is never used to construct the name of DXIL Op call name. 267 // Denote DXIL Op to be supported in all stages 269 // Denote support for DXIL Op to have been removed 272 // DXIL Op attributes 275 // attribute that will be set when building the DXIL op. The mapping is defined 284 // A property is simply used to mark that a DXIL o [all...] |
/llvm-project/llvm/tools/obj2yaml/ |
H A D | dxcontainer2yaml.cpp | 56 case dxbc::PartType::DXIL: { in dumpDXContainer() 57 std::optional<DXContainer::DXILData> DXIL = Container.getDXIL(); in dumpDXContainer() local 58 assert(DXIL && "Since we are iterating and found a DXIL part, " in dumpDXContainer() 61 DXIL->first.getMajorVersion(), in dumpDXContainer() 62 DXIL->first.getMinorVersion(), in dumpDXContainer() 63 DXIL->first.ShaderKind, in dumpDXContainer() 64 DXIL->first.Size, in dumpDXContainer() 65 DXIL->first.Bitcode.MajorVersion, in dumpDXContainer() 66 DXIL->first.Bitcode.MinorVersion, in dumpDXContainer() 67 DXIL->first.Bitcode.Offset, in dumpDXContainer() [all …]
|
/llvm-project/llvm/lib/Target/DirectX/DXILWriter/ |
H A D | DXILWriterPass.cpp | 28 using namespace llvm::dxil; 62 StringRef getPassName() const override { return "DXIL Embedder"; } in getPassName() 69 // Set to DXIL triple when write to bitcode. in runOnModule() 70 // Only the output bitcode need to be DXIL triple. in runOnModule() 71 M.setTargetTriple("dxil-ms-dx"); in runOnModule() 82 ModuleConstant, "dx.dxil"); in runOnModule() 83 GV->setSection("DXIL"); in runOnModule() 96 INITIALIZE_PASS_BEGIN(WriteDXILPass, "dxil-write-bitcode", "Write Bitcode", 99 INITIALIZE_PASS_END(WriteDXILPass, "dxil-write-bitcode", "Write Bitcode", false, in INITIALIZE_PASS_DEPENDENCY() 107 INITIALIZE_PASS(EmbedDXILPass, "dxil-embed", "Embed DXIL", false, true)
|
/llvm-project/clang/test/CodeGenHLSL/ |
H A D | basic-target.c | 1 // RUN: %clang -target dxil-pc-shadermodel6.0-pixel -S -emit-llvm -o - %s | FileCheck %s 2 // RUN: %clang -target dxil-pc-shadermodel6.0-vertex -S -emit-llvm -o - %s | FileCheck %s 3 // RUN: %clang -target dxil-pc-shadermodel6.0-compute -S -emit-llvm -o - %s | FileCheck %s 4 // RUN: %clang -target dxil-pc-shadermodel6.0-library -S -emit-llvm -o - %s | FileCheck %s 5 // RUN: %clang -target dxil-pc-shadermodel6.0-hull -S -emit-llvm -o - %s | FileCheck %s 6 // RUN: %clang -target dxil-pc-shadermodel6.0-domain -S -emit-llvm -o - %s | FileCheck %s 7 // RUN: %clang -target dxil-pc-shadermodel6.0-geometry -S -emit-llvm -o - %s | FileCheck %s
|
/llvm-project/llvm/test/Frontend/HLSL/ |
H A D | empty_cs_entry.ll | 1 ; RUN: %if directx-registered-target %{ opt -S -dxil-translate-metadata < %s | FileCheck %s --check-prefix=DXIL-CHECK %} 5 target triple = "dxil-unknown-shadermodel6.7-compute" 7 ;DXIL-CHECK:!dx.entryPoints = !{![[entry:[0-9]+]]} 9 ;DXIL-CHECK:![[entry]] = !{ptr @entry, !"entry", null, null, ![[extra:[0-9]+]]} 10 ;DXIL-CHECK:![[extra]] = !{i32 4, ![[numthreads:[0-9]+]]} 11 ;DXIL-CHECK:![[numthreads]] = !{i32 1, i32 2, i32 1}
|
/llvm-project/clang/test/SemaHLSL/ |
H A D | num_threads.hlsl | 1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s | FileCheck %s 2 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-mesh -x hlsl -ast-dump -o - %s | FileCheck %s 3 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-amplification -x hlsl -ast-dump -o - %s | FileChe… 4 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-library -x hlsl -ast-dump -o - %s | FileCheck %s 5 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-pixel -x hlsl -ast-dump -o - %s -verify 6 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-vertex -x hlsl -ast-dump -o - %s -verify 7 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-hull -x hlsl -ast-dump -o - %s -verify 8 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-domain -x hlsl -ast-dump -o - %s -verify 9 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.0-compute -x hlsl -ast-dump -o - %s -DFAIL -verify 10 // RUN: %clang_cc1 -triple dxil-pc-shadermodel5.0-compute -x hlsl -ast-dump -o - %s -DFAIL -verify [all …]
|
/llvm-project/llvm/tools/dxil-dis/ |
H A D | CMakeLists.txt | 1 option(LLVM_INCLUDE_DXIL_TESTS "Include DXIL tests" Off) 9 message(FATAL_ERROR "Building dxil-dis tests is unsupported without the DirectX target") 19 add_custom_target(dxil-dis 20 COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${DXIL_DIS}" "${LLVM_RUNTIME_OUTPUT_INTDIR}/dxil-dis${CMAKE_EXECUTABLE_SUFFIX}") 47 add_custom_target(dxil-dis 48 COMMAND ${CMAKE_COMMAND} -E ${LLVM_LINK_OR_COPY} "${BINARY_DIR}/bin/llvm-dis${CMAKE_EXECUTABLE_SUFFIX}" "${LLVM_RUNTIME_OUTPUT_INTDIR}/dxil-dis${CMAKE_EXECUTABLE_SUFFIX}"
|
/llvm-project/llvm/include/llvm/Support/ |
H A D | DXILABI.h | 1 //===-- DXILABI.h - ABI Sensitive Values for DXIL ---------------*- C++ -*-===// 10 // required to remain stable as per the DXIL format's requirements. 12 // Documentation for DXIL can be found in 13 // https://github.com/Microsoft/DirectXShaderCompiler/blob/main/docs/DXIL.rst. 23 namespace dxil { 33 /// "Shape" in the DXIL docs. 102 } // namespace dxil
|
/llvm-project/clang/test/CodeGenHLSL/semantics/ |
H A D | DispatchThreadID.hlsl | 1 // RUN: %clang_cc1 -triple dxil-pc-shadermodel6.3-library -x hlsl -emit-llvm -finclude-default-header -disable-llvm-passes -o - %s | FileCheck %s --check-prefixes=CHECK,CHECK-DXIL -DTARGET=dx 7 // CHECK-DXIL: %[[#ID:]] = call i32 @llvm.[[TARGET]].thread.id(i32 0) 9 // CHECK-DXIL: call void @{{.*}}foo{{.*}}(i32 %[[#ID]]) 20 // CHECK-DXIL: call void @{{.*}}bar{{.*}}(<2 x i32> %[[#ID_XY]])
|