[all-commits] [llvm/llvm-project] bb0bbe: Fix bytecode reader/writer on big-endian platforms
Ulrich Weigand via All-commits
all-commits at lists.llvm.org
Fri Jun 23 00:23:22 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: bb0bbed610d86ba155f9c066c23038f7f34e2dbb
https://github.com/llvm/llvm-project/commit/bb0bbed610d86ba155f9c066c23038f7f34e2dbb
Author: Ulrich Weigand <ulrich.weigand at de.ibm.com>
Date: 2023-06-23 (Fri, 23 Jun 2023)
Changed paths:
M mlir/lib/Bytecode/Reader/BytecodeReader.cpp
M mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
M mlir/test/Bytecode/general.mlir
M mlir/test/Bytecode/invalid/invalid-dialect_section.mlir
M mlir/test/Bytecode/invalid/invalid-ir_section.mlir
M mlir/test/Bytecode/invalid/invalid-string_section.mlir
M mlir/test/Bytecode/invalid/invalid-structure.mlir
M mlir/test/Bytecode/invalid/invalid_attr_type_offset_section.mlir
M mlir/test/Bytecode/invalid/invalid_attr_type_section.mlir
M mlir/test/Bytecode/resources.mlir
M mlir/test/Bytecode/versioning/versioned_attr.mlir
M mlir/test/Bytecode/versioning/versioned_bytecode.mlir
M mlir/test/Bytecode/versioning/versioned_op.mlir
M mlir/test/Dialect/Builtin/Bytecode/attrs.mlir
M mlir/test/Dialect/Builtin/Bytecode/types.mlir
M mlir/test/Dialect/Quant/Bytecode/types.mlir
M mlir/unittests/Bytecode/BytecodeTest.cpp
Log Message:
-----------
Fix bytecode reader/writer on big-endian platforms
This makes the bytecode reader/writer work on big-endian platforms.
The only problem was related to encoding of multi-byte integers,
where both reader and writer code make implicit assumptions about
endianness of the host platform.
This fixes the current test failures on s390x, and in addition allows
to remove the UNSUPPORTED markers from all other bytecode-related
test cases - they now also all pass on s390x.
Also adding a GFAIL_SKIP to the MultiModuleWithResource unit test,
as this still fails due to an unrelated endian bug regarding
decoding of external resources.
Differential Revision: https://reviews.llvm.org/D153567
Reviewed By: mehdi_amini, jpienaar, rriddle
More information about the All-commits
mailing list