MCPcopy Create free account
hub / github.com/NVIDIA/cuda-tile / getOpcodeRange

Function getOpcodeRange

tools/cuda-tile-tblgen/BytecodeGen.cpp:39–46  ·  view source on GitHub ↗

Reads an OpcodeRange definition from TableGen records. Returns {minValue, maxValue} or nullopt if not defined.

Source from the content-addressed store, hash-verified

37/// Reads an OpcodeRange definition from TableGen records.
38/// Returns {minValue, maxValue} or nullopt if not defined.
39static std::optional<std::pair<unsigned, unsigned>>
40getOpcodeRange(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.

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected