[all-commits] [llvm/llvm-project] 0b8c63: [MLIR] Move builtin.module LLVM IR translation to ...

Sergio Afonso via All-commits all-commits at lists.llvm.org
Fri Sep 1 09:09:56 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0b8c636211b89ba721f060d30290e8a1992879b7
      https://github.com/llvm/llvm-project/commit/0b8c636211b89ba721f060d30290e8a1992879b7
  Author: Sergio Afonso <safonsof at amd.com>
  Date:   2023-09-01 (Fri, 01 Sep 2023)

  Changed paths:
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
    A mlir/test/Target/LLVMIR/test.mlir
    M mlir/test/lib/Dialect/Test/CMakeLists.txt
    A mlir/test/lib/Dialect/Test/TestToLLVMIRTranslation.cpp
    M mlir/tools/mlir-translate/mlir-translate.cpp

  Log Message:
  -----------
  [MLIR] Move builtin.module LLVM IR translation to before nested operations

This patch moves the call for translating an MLIR module to LLVM IR to the
beginning of the translation process. This enables the use of dialect
attributes attached to `builtin.module` operations and the `amendOperation()`
flow to initialize dialect-specific global configuration before translating
the contents of the module.

Currently, this patch does not impact the generated IR on its own. Testing
infrastructure to allow translating the Test dialect to LLVM IR is added, so
that it can be checked that the current behavior is not broken in the future.

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




More information about the All-commits mailing list