[all-commits] [llvm/llvm-project] 6c5ae8: [mlir] Support opaque types in LLVM IR -> MLIR tra...

ftynse via All-commits all-commits at lists.llvm.org
Fri Apr 15 08:51:46 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c5ae8e9744b6dab85efab404b0338fe70b0bd73
  Author: Alex Zinenko <zinenko at google.com>
  Date:   2022-04-15 (Fri, 15 Apr 2022)

  Changed paths:
    M mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    M mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
    M mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
    M mlir/lib/Target/LLVMIR/TypeFromLLVM.cpp
    A mlir/test/Target/LLVMIR/import-opaque.ll
    M mlir/test/Target/LLVMIR/import.ll

  Log Message:
  [mlir] Support opaque types in LLVM IR -> MLIR translation

LLVM IR is moving towards adoption of opaque pointer types. These require extra
information to be passed when constructing some operations, in particular GEP
and Alloca. Adapt the builders of said operations and modify the translation
code to handle both opaque and non-opaque pointers.

This incidentally adds the translation for Alloca alignment and fixes the translation
of struct-related GEP indices that must be constant.

Reviewed By: wsmoses

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

More information about the All-commits mailing list