Parses the function body bytecode and creates the corresponding operations.
| 2102 | |
| 2103 | /// Parses the function body bytecode and creates the corresponding operations. |
| 2104 | static LogicalResult |
| 2105 | parseFunctionBody(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. |
| 2125 | static LogicalResult createFunction( |
no test coverage detected