[all-commits] [llvm/llvm-project] 6e3952: [mlir][llvm] Call the instruction builders from a ...

Tobias Gysi via All-commits all-commits at lists.llvm.org
Tue Jan 10 05:26:22 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6e39520630e2fdaf21e2f1a0af826d0dac7a248b
      https://github.com/llvm/llvm-project/commit/6e39520630e2fdaf21e2f1a0af826d0dac7a248b
  Author: Tobias Gysi <tobias.gysi at nextsilicon.com>
  Date:   2023-01-10 (Tue, 10 Jan 2023)

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

  Log Message:
  -----------
  [mlir][llvm] Call the instruction builders from a static method (NFC).

Extract a static method to call the MLIR builders that translate LLVM IR
instructions to MLIR LLVM dialect operations. This change ensures the
MLIR builders have to use the moduleImport argument rather than calling
the import methods directly. As a result, both the intrinsic and the
instruction MLIR builders have to use a moduleImport argument and none
of them has direct access to private moduleImport methods. The revision
thus enforces consistent MLIR builder implementations for instructions
and intrinsics.

The revision also moves parseDataLayoutAlignment closer to its use.

Reviewed By: Dinistro

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




More information about the All-commits mailing list