Reads an OpcodeRange definition from TableGen records. Returns {minValue, maxValue} or nullopt if not defined.
| 37 | /// Reads an OpcodeRange definition from TableGen records. |
| 38 | /// Returns {minValue, maxValue} or nullopt if not defined. |
| 39 | static std::optional<std::pair<unsigned, unsigned>> |
| 40 | getOpcodeRange(const RecordKeeper &records, StringRef name) { |
| 41 | const Record *def = records.getDef(name); |
| 42 | if (!def) |
| 43 | return std::nullopt; |
| 44 | return std::make_pair(static_cast<unsigned>(def->getValueAsInt("minValue")), |
| 45 | static_cast<unsigned>(def->getValueAsInt("maxValue"))); |
| 46 | } |
| 47 | |
| 48 | /// Validates that all CudaTileOpDef operations have bytecode opcode |
| 49 | /// assignments. |
no outgoing calls
no test coverage detected