[all-commits] [llvm/llvm-project] 09fd9e: [mlir] Execute all requested translations in MlirT...

Fabian Tschopp via All-commits all-commits at lists.llvm.org
Sat Feb 18 17:12:45 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 09fd9ef4f4cb5c7b25bdb9f97d7e92445aec3417
      https://github.com/llvm/llvm-project/commit/09fd9ef4f4cb5c7b25bdb9f97d7e92445aec3417
  Author: Fabian <fabian.tschopp at modular.com>
  Date:   2023-02-18 (Sat, 18 Feb 2023)

  Changed paths:
    M mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp
    A mlir/test/Target/SPIRV/array-two-step-roundtrip.mlir

  Log Message:
  -----------
  [mlir] Execute all requested translations in MlirTranslateMain

Currently, MlirTranslateMain only executes one of the requested translations, and does not error if multiple are specified. This commit enables translations to be chained in the specified order.

This makes round-trip tests easier, since existing import/export passes can be reused and no combined round-trip passes have to be registered (example: mlir-translate  -serialize-spirv -deserialize-spirv).

Additionally, by leveraging TranslateRegistration with file-to-file TranslateFunctions, generic pre- and post-processing can be added before/after conversion to/from MLIR.

Reviewed By: lattner, Mogball

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




More information about the All-commits mailing list