[llvm] [DXIL] Model DXIL Class specification of DXIL Ops in DXIL.td (PR #87803)
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Fri May 31 13:09:00 PDT 2024
================
@@ -259,24 +245,23 @@ static std::string getOverloadKindStr(const Record *R) {
return "OverloadKind::I32";
case MVT::i64:
return "OverloadKind::I64";
- case MVT::iAny:
- return "OverloadKind::I16 | OverloadKind::I32 | OverloadKind::I64";
- case MVT::fAny:
- return "OverloadKind::HALF | OverloadKind::FLOAT | OverloadKind::DOUBLE";
- case MVT::Other:
- // Handle DXIL-specific overload types
- {
- if (R->getValueAsInt("isHalfOrFloat")) {
- return "OverloadKind::HALF | OverloadKind::FLOAT";
- } else if (R->getValueAsInt("isI16OrI32")) {
- return "OverloadKind::I16 | OverloadKind::I32";
- }
- }
- [[fallthrough]];
default:
- llvm_unreachable(
- "Support for specified parameter OverloadKind not yet implemented");
+ llvm_unreachable("Support for specified fixed type option for overload "
+ "type not supported");
+ }
+}
+/// Return a string representation of OverloadKind enum that maps to
+/// input LLVMType record
+/// \param OLTys Overload types list record
+/// \return std::string string representation of OverloadKind
+static std::string getOverloadKindStrs(const SmallVector<Record *> OLTys) {
+ std::string OverloadString = "";
+ std::string Prefix = "";
+ for (auto OLTy : OLTys) {
----------------
bogner wrote:
Better to spell this as `const Record *OLTy`
https://github.com/llvm/llvm-project/pull/87803
More information about the llvm-commits
mailing list