[all-commits] [llvm/llvm-project] f47872: [MLIR][LLVM] Add accessor for LLVMModule and invok...

agozillon via All-commits all-commits at lists.llvm.org
Thu Apr 27 12:53:27 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f478721231bdb71ba8f0f6fb21673b9b7f652add
      https://github.com/llvm/llvm-project/commit/f478721231bdb71ba8f0f6fb21673b9b7f652add
  Author: Andrew Gozillon <Andrew.Gozillon at amd.com>
  Date:   2023-04-27 (Thu, 27 Apr 2023)

  Changed paths:
    M mlir/include/mlir/Target/LLVMIR/ModuleTranslation.h
    M mlir/lib/Target/LLVMIR/ModuleTranslation.cpp

  Log Message:
  -----------
  [MLIR][LLVM] Add accessor for LLVMModule and invoke convertDialectAttributes on GlobalOps

This patch seeks to do two things add an accessor method to
retrieve the ModuleTranslations contained LLVM Module for direct
usage by dialects that are being lowered to LLVM-IR. One particular
use case for this is in the OpenMP Dialect, when interfacing
with the OMPIRBuilder in certain cases it is useful to be able
to access the LLVM Module directly.

The second is invoking convertDialectAttributes on GlobalOp's
so as to be able to lower dialect specific attributes that are
applied or lowered onto GlobalOp's.

Reviewers: ftynse

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




More information about the All-commits mailing list