[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 07:50:13 PDT 2024
================
@@ -172,9 +176,34 @@ DXILOperationDesc::DXILOperationDesc(const Record *R) {
if (!OverloadParamIndices.empty()) {
if (OverloadParamIndices.size() > 1)
report_fatal_error("Multiple overload type specification not supported",
- false);
+ /*gen_crash_diag*/ false);
OverloadParamIndex = OverloadParamIndices[0];
}
+
+ // Get valid overload types of the Operation
+ std::vector<Record *> OverloadTypeRecs =
+ R->getValueAsListOfDefs("OpOverloadTypes");
----------------
bharadwajy wrote:
> Usually better to use `SmallVector` rather than a `std::vector` on the stack, especially for something that we wouldn't expect very many elements in.
Type of `OverloadTypeRecs` is declared to be same as the return type of `Record::getValueAsListOfDefs(StringRef FieldName)` viz., `std::vector<Record*> `.
https://github.com/llvm/llvm-project/pull/87803
More information about the llvm-commits
mailing list