[all-commits] [llvm/llvm-project] 83dc99: [mlir:Bytecode][NFC] Refactor string section writi...

River Riddle via All-commits all-commits at lists.llvm.org
Tue Aug 23 16:56:44 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 83dc9999486fb3fb7e11d684312d034128d1b050
      https://github.com/llvm/llvm-project/commit/83dc9999486fb3fb7e11d684312d034128d1b050
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-08-23 (Tue, 23 Aug 2022)

  Changed paths:
    M mlir/lib/Bytecode/Reader/BytecodeReader.cpp
    M mlir/lib/Bytecode/Writer/BytecodeWriter.cpp

  Log Message:
  -----------
  [mlir:Bytecode][NFC] Refactor string section writing and reading

This extracts the string section writer and reader into dedicated
classes, which better separates the logic and will also simplify future
patches that want to interact with the string section.

Differential Revision: https://reviews.llvm.org/D132496


  Commit: b3449392f55739ec950b038f6a81e5c0a5ef0cae
      https://github.com/llvm/llvm-project/commit/b3449392f55739ec950b038f6a81e5c0a5ef0cae
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-08-23 (Tue, 23 Aug 2022)

  Changed paths:
    M mlir/lib/Bytecode/Reader/BytecodeReader.cpp

  Log Message:
  -----------
  [mlir:Bytecode][NFC] Cleanup Attribute/Type reading

This moves some parsing functionality from BytecodeReader to
AttrTypeReader, and removes some duplication between the attribute/type
code paths.

Differential Revision: https://reviews.llvm.org/D132497


  Commit: 02c2ecb9c6c355b8b6f650d258077bd9cca0aacf
      https://github.com/llvm/llvm-project/commit/02c2ecb9c6c355b8b6f650d258077bd9cca0aacf
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-08-23 (Tue, 23 Aug 2022)

  Changed paths:
    M mlir/docs/BytecodeFormat.md
    A mlir/include/mlir/Bytecode/BytecodeImplementation.h
    M mlir/include/mlir/IR/DialectInterface.h
    M mlir/lib/Bytecode/Reader/BytecodeReader.cpp
    M mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
    M mlir/lib/Bytecode/Writer/IRNumbering.cpp
    M mlir/lib/Bytecode/Writer/IRNumbering.h
    M mlir/lib/IR/BuiltinDialect.cpp
    A mlir/lib/IR/BuiltinDialectBytecode.cpp
    A mlir/lib/IR/BuiltinDialectBytecode.h
    M mlir/lib/IR/CMakeLists.txt
    M mlir/lib/IR/Dialect.cpp
    A mlir/test/Dialect/Builtin/Bytecode/attrs.mlir
    A mlir/test/Dialect/Builtin/Bytecode/types.mlir

  Log Message:
  -----------
  [mlir:Bytecode] Add initial support for dialect defined attribute/type encodings

Dialects can opt-in to providing custom encodings by implementing the
`BytecodeDialectInterface`. This interface provides hooks, namely
`readAttribute`/`readType` and `writeAttribute`/`writeType`, that will be used
by the bytecode reader and writer. These hooks are provided a reader and writer
implementation that can be used to encode various constructs in the underlying
bytecode format. A unique feature of this interface is that dialects may choose
to only encode a subset of their attributes and types in a custom bytecode
format, which can simplify adding new or experimental components that aren't
fully baked.

Differential Revision: https://reviews.llvm.org/D132498


  Commit: df4e637ca7ef4ef17b662845120864921e65bb67
      https://github.com/llvm/llvm-project/commit/df4e637ca7ef4ef17b662845120864921e65bb67
  Author: River Riddle <riddleriver at gmail.com>
  Date:   2022-08-23 (Tue, 23 Aug 2022)

  Changed paths:
    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

  Log Message:
  -----------
  [mlir:Bytecode] Use UNSUPPORTED instead of XFAIL for s390x

Some tests still pass even though we don't claim big-endian support. Using
UNSUPPORTED is a better indicator than XFAIL that we don't guarantee that
the tests work.


Compare: https://github.com/llvm/llvm-project/compare/d10c1b88f0a0...df4e637ca7ef


More information about the All-commits mailing list