[all-commits] [llvm/llvm-project] f18d6a: [mlirTranslateMain] Add a customization callback.

Chris Lattner via All-commits all-commits at lists.llvm.org
Sat Mar 12 13:18:46 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f18d6af7e972ed0e2215ad098b4c5f52ccb68b5f
      https://github.com/llvm/llvm-project/commit/f18d6af7e972ed0e2215ad098b4c5f52ccb68b5f
  Author: Chris Lattner <clattner at nondot.org>
  Date:   2022-03-12 (Sat, 12 Mar 2022)

  Changed paths:
    M mlir/include/mlir/Tools/mlir-translate/MlirTranslateMain.h
    M mlir/lib/Tools/mlir-translate/MlirTranslateMain.cpp

  Log Message:
  -----------
  [mlirTranslateMain] Add a customization callback.

mlir-translate and related tools currently have a fixed set
of flags that are built into Translation.cpp.  This works for
simple cases, but some clients want to change the default
globally (e.g. default to allowing unregistered dialects
without a command line flag), or support dialect-independent
translations without having those translations register every
conceivable dialect they could be used with (breaking
modularity).

This approach could also be applied to mlirOptMain to reduce
the significant number of flags it has accumulated.

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




More information about the All-commits mailing list