[all-commits] [llvm/llvm-project] 0610e2: [mlir][bytecode] Allow client to specify a desired...

Jacques Pienaar via All-commits all-commits at lists.llvm.org
Sat Apr 29 05:36:08 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0610e2f6a2d42d83ff7a75729b3afa45d75729cc
      https://github.com/llvm/llvm-project/commit/0610e2f6a2d42d83ff7a75729b3afa45d75729cc
  Author: Jacques Pienaar <jpienaar at google.com>
  Date:   2023-04-29 (Sat, 29 Apr 2023)

  Changed paths:
    M mlir/include/mlir-c/IR.h
    M mlir/include/mlir/Bytecode/BytecodeImplementation.h
    M mlir/include/mlir/Bytecode/BytecodeWriter.h
    M mlir/include/mlir/CAPI/IR.h
    M mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
    M mlir/lib/Bindings/Python/IRCore.cpp
    M mlir/lib/Bindings/Python/IRModule.h
    M mlir/lib/Bytecode/Writer/BytecodeWriter.cpp
    M mlir/lib/Bytecode/Writer/IRNumbering.cpp
    M mlir/lib/CAPI/IR/IR.cpp
    M mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
    A mlir/test/Bytecode/versioning/versioned_bytecode.mlir
    M mlir/test/python/ir/operation.py

  Log Message:
  -----------
  [mlir][bytecode] Allow client to specify a desired version.

Add method to set a desired bytecode file format to generate. Change
write method to be able to return status including the minimum bytecode
version needed by reader. This enables generating an older version of
the bytecode (not dialect ops, attributes or types). But this does not
guarantee that an older version can always be generated, e.g., if a
dialect uses a new encoding only available at later bytecode version.
This clamps setting to at most current version.

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




More information about the All-commits mailing list