[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:30:10 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,
+ const VersionTuple DXILVer) {
+ auto Size = PropList.size();
----------------
llvm-beanz wrote:
`auto` doesn't help readability here (https://llvm.org/docs/CodingStandards.html#use-auto-type-deduction-to-make-code-more-readable)
```suggestion
size_t Size = PropList.size();
```
https://github.com/llvm/llvm-project/pull/97593
More information about the llvm-commits
mailing list