[all-commits] [llvm/llvm-project] f3acb5: [mlir] Add initial support for a binary serializat...
River Riddle via All-commits
all-commits at lists.llvm.org
Mon Aug 22 00:47:10 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: f3acb54c1b7b7721cea5c07f64194151dddd3c4b
https://github.com/llvm/llvm-project/commit/f3acb54c1b7b7721cea5c07f64194151dddd3c4b
Author: River Riddle <riddleriver at gmail.com>
Date: 2022-08-22 (Mon, 22 Aug 2022)
Changed paths:
A mlir/docs/BytecodeFormat.md
A mlir/include/mlir/Bytecode/BytecodeReader.h
A mlir/include/mlir/Bytecode/BytecodeWriter.h
M mlir/include/mlir/IR/OperationSupport.h
M mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
A mlir/lib/Bytecode/CMakeLists.txt
A mlir/lib/Bytecode/Encoding.h
A mlir/lib/Bytecode/Reader/BytecodeReader.cpp
A mlir/lib/Bytecode/Reader/CMakeLists.txt
A mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
A mlir/lib/Bytecode/Writer/CMakeLists.txt
A mlir/lib/Bytecode/Writer/IRNumbering.cpp
A mlir/lib/Bytecode/Writer/IRNumbering.h
M mlir/lib/CMakeLists.txt
M mlir/lib/Parser/CMakeLists.txt
M mlir/lib/Parser/Parser.cpp
M mlir/lib/Tools/mlir-opt/CMakeLists.txt
M mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
A mlir/test/Bytecode/general.mlir
A mlir/test/Bytecode/invalid/invalid-attr_type_offset_section-large_offset.mlirbc
A mlir/test/Bytecode/invalid/invalid-attr_type_offset_section-trailing_data.mlirbc
A mlir/test/Bytecode/invalid/invalid-attr_type_section-index.mlirbc
A mlir/test/Bytecode/invalid/invalid-attr_type_section-trailing_data.mlirbc
A mlir/test/Bytecode/invalid/invalid-dialect_section-dialect_string.mlirbc
A mlir/test/Bytecode/invalid/invalid-dialect_section-opname_dialect.mlirbc
A mlir/test/Bytecode/invalid/invalid-dialect_section-opname_string.mlirbc
A mlir/test/Bytecode/invalid/invalid-dialect_section.mlir
A mlir/test/Bytecode/invalid/invalid-ir_section-attr.mlirbc
A mlir/test/Bytecode/invalid/invalid-ir_section-forwardref.mlirbc
A mlir/test/Bytecode/invalid/invalid-ir_section-loc.mlirbc
A mlir/test/Bytecode/invalid/invalid-ir_section-operands.mlirbc
A mlir/test/Bytecode/invalid/invalid-ir_section-opname.mlirbc
A mlir/test/Bytecode/invalid/invalid-ir_section-results.mlirbc
A mlir/test/Bytecode/invalid/invalid-ir_section-successors.mlirbc
A mlir/test/Bytecode/invalid/invalid-ir_section.mlir
A mlir/test/Bytecode/invalid/invalid-string_section-count.mlirbc
A mlir/test/Bytecode/invalid/invalid-string_section-large_string.mlirbc
A mlir/test/Bytecode/invalid/invalid-string_section-no_string.mlirbc
A mlir/test/Bytecode/invalid/invalid-string_section-trailing_data.mlirbc
A mlir/test/Bytecode/invalid/invalid-string_section.mlir
A mlir/test/Bytecode/invalid/invalid-structure-producer.mlirbc
A mlir/test/Bytecode/invalid/invalid-structure-section-duplicate.mlirbc
A mlir/test/Bytecode/invalid/invalid-structure-section-id-unknown.mlirbc
A mlir/test/Bytecode/invalid/invalid-structure-section-length.mlirbc
A mlir/test/Bytecode/invalid/invalid-structure-section-missing.mlirbc
A mlir/test/Bytecode/invalid/invalid-structure-version.mlirbc
A mlir/test/Bytecode/invalid/invalid-structure.mlir
A mlir/test/Bytecode/invalid/invalid_attr_type_offset_section.mlir
A mlir/test/Bytecode/invalid/invalid_attr_type_section.mlir
Log Message:
-----------
[mlir] Add initial support for a binary serialization format
This commit adds a new bytecode serialization format for MLIR.
The actual serialization of MLIR to binary is relatively straightforward,
given the very very general structure of MLIR. The underlying basis for
this format is a variable-length encoding for integers, which gets heavily
used for nearly all aspects of the encoding (given that most of the encoding
is just indexing into lists).
The format currently does not provide support for custom attribute/type
serialization, and thus always uses an assembly format fallback. It also
doesn't provide support for resources. These will be added in followups,
the intention for this patch is to provide something that supports the
basic cases, and can be built on top of.
https://discourse.llvm.org/t/rfc-a-binary-serialization-format-for-mlir/63518
Differential Revision: https://reviews.llvm.org/D131747
More information about the All-commits
mailing list