[llvm] [DXIL] Model DXIL Class and Shader Model association of DXIL Ops in DXIL.td (PR #87803)

S. Bharadwaj Yadavalli via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 10 18:47:35 PDT 2024


================
@@ -90,4 +90,9 @@ enum class ElementType : uint32_t {
 } // namespace dxil
 } // namespace llvm
 
+// Generate a unique value for given Major, Minor pair of Shader Model
+// version. Allows for 100 minor versions for a given major version number.
+// To be used uniformly by DXILEmitter backend as well as DXIL Lowering pass.
+#define COMPUTE_SM_VERSION_VALUE(MAJ, MIN) ((MAJ * 100) + MIN)
----------------
bharadwajy wrote:

> It seems like we should use `llvm::VersionTuple` for this instead of rolling our own way to mash version numbers together and compare them.

Made changes that use `VersionTuple`.

https://github.com/llvm/llvm-project/pull/87803


More information about the llvm-commits mailing list