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

Function parseFunctionBody

lib/Bytecode/Reader/BytecodeReader.cpp:2104–2122  ·  view source on GitHub ↗

Parses the function body bytecode and creates the corresponding operations.

Source from the content-addressed store, hash-verified

2102
2103/// Parses the function body bytecode and creates the corresponding operations.
2104static LogicalResult
2105parseFunctionBody(ArrayRef<uint8_t> bodyBytes, OpBuilder &innerBuilder,
2106 std::vector<Value> &valueIndexList,
2107 DebugInfoReader::Iterator &diIterator,
2108 ArrayRef<ArrayRef<uint8_t>> constants, LazyTypeTable &types,
2109 DenseElementsAttrCache &constCache, MLIRContext &context,
2110 const EncodingReader &mainFileStreamReader,
2111 const BytecodeVersion &bytecodeVersion) {
2112 EncodingReader bodyReader(bodyBytes, context);
2113 // Inherit the string table from the main file stream reader.
2114 bodyReader.inheritStringTableFrom(mainFileStreamReader);
2115
2116 while (bodyReader.remaining() > 0)
2117 if (failed(InstructionParser::parseOperation(
2118 bodyReader, innerBuilder, valueIndexList, constants, types,
2119 constCache, diIterator, context, bytecodeVersion)))
2120 return failure();
2121 return success();
2122}
2123
2124/// Creates a function based on the parsed FunctionInfo.
2125static LogicalResult createFunction(

Callers 1

createFunctionFunction · 0.85

Calls 2

remainingMethod · 0.80

Tested by

no test coverage detected