[llvm] [DXIL] Add DXIL version-specific TableGen specification and implementation of DXIL Ops (PR #97593)

Chris B via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 26 14:16:28 PDT 2024


================
@@ -249,17 +309,95 @@ static FunctionType *getDXILOpFunctionType(const OpCodeProperty *Prop,
       ArgTys[0], ArrayRef<Type *>(&ArgTys[1], ArgTys.size() - 1), false);
 }
 
+/// Get index of the property from PropList valid for the most recent
+/// DXIL version not greater than DXILVer.
+/// PropList is expected to be sorted in ascending order of DXIL version.
+template <typename T>
+static int getPropIndex(const std::vector<T> PropList,
----------------
llvm-beanz wrote:

`const &` or maybe `llvm::ArrayRef<T>` instead to avoid copies.

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


More information about the llvm-commits mailing list