[llvm] [DXIL] Model DXIL Class and Shader Model association of DXIL Ops in DXIL.td (PR #87803)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 9 17:10:36 PDT 2024
================
@@ -124,32 +128,32 @@ DXILOperationDesc::DXILOperationDesc(const Record *R) {
// the comment before the definition of class LLVMMatchType in
// llvm/IR/Intrinsics.td
SmallVector<int> OverloadParamIndices;
- for (unsigned i = 0; i < TypeRecsSize; i++) {
- auto TR = TypeRecs[i];
+ for (unsigned I = 0; I < ParamTypeRecsSize; I++) {
+ auto TR = ParamTypeRecs[I];
// Track operation parameter indices of any overload types
- auto isAny = TR->getValueAsInt("isAny");
- if (isAny == 1) {
+ auto IsAny = TR->getValueAsInt("isAny");
+ if (IsAny == 1) {
// TODO: At present it is expected that all overload types in a DXIL Op
// are of the same type. Hence, OverloadParamIndices will have only one
// element. This implies we do not need a vector. However, until more
// (all?) DXIL Ops are added in DXIL.td, a vector is being used to flag
// cases this assumption would not hold.
if (!OverloadParamIndices.empty()) {
- bool knownType = true;
+ bool KnownType = true;
// Ensure that the same overload type registered earlier is being used
for (auto Idx : OverloadParamIndices) {
- if (TR != TypeRecs[Idx]) {
- knownType = false;
+ if (TR != ParamTypeRecs[Idx]) {
+ KnownType = false;
break;
}
}
- if (!knownType) {
+ if (!KnownType) {
report_fatal_error("Specification of multiple differing overload "
"parameter types not yet supported",
- false);
+ /*gen_crash_diag*/ false);
----------------
bogner wrote:
It isn't new, but this should be an assert, not a `report_fatal_error`. As described in the TODO above hitting this means we've made a mistake.
https://github.com/llvm/llvm-project/pull/87803
More information about the llvm-commits
mailing list