[all-commits] [llvm/llvm-project] 4b2782: [mlir-opt] Support parsing operations other than '...

rk via All-commits all-commits at lists.llvm.org
Tue Sep 27 18:14:02 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 4b27825ba36d55779561c0a2c3c2f89f52d81303
      https://github.com/llvm/llvm-project/commit/4b27825ba36d55779561c0a2c3c2f89f52d81303
  Author: rkayaith <rkayaith at gmail.com>
  Date:   2022-09-27 (Tue, 27 Sep 2022)

  Changed paths:
    M mlir/include/mlir/IR/OwningOpRef.h
    M mlir/include/mlir/Parser/Parser.h
    A mlir/include/mlir/Tools/ParseUtilties.h
    M mlir/include/mlir/Tools/mlir-opt/MlirOptMain.h
    M mlir/lib/Tools/mlir-opt/MlirOptMain.cpp
    A mlir/test/IR/top-level.mlir
    A mlir/test/Pass/pipeline-invalid.mlir

  Log Message:
  -----------
  [mlir-opt] Support parsing operations other than 'builtin.module' as top-level

This adds a `--no-implicit-module` option, which disables the insertion
of a top-level `builtin.module` during parsing. In this mode any op may
be top-level, however it's required that there be exactly one top-level
op in the source.

`parseSource{File,String}` now support `Operation *` as the container op
type, which disables the top-level-op-insertion behaviour.

Following patches will add the same option to the other tools as well.

Depends on D133644

Reviewed By: rriddle

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




More information about the All-commits mailing list