[all-commits] [llvm/llvm-project] a664c1: [mlir][LLVM] Revert bareptr calling convention han...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Wed Jul 21 15:07:12 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a664c14001fa2359604527084c91d0864aa131a4
      https://github.com/llvm/llvm-project/commit/a664c14001fa2359604527084c91d0864aa131a4
  Author: Nicolas Vasilache <nicolas.vasilache at gmail.com>
  Date:   2021-07-21 (Wed, 21 Jul 2021)

  Changed paths:
    M mlir/lib/Conversion/LLVMCommon/TypeConverter.cpp
    M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
    M mlir/test/Conversion/StandardToLLVM/func-memref.mlir

  Log Message:
  -----------
  [mlir][LLVM] Revert bareptr calling convention handling as an argument materialization.

Type conversion and argument materialization are context-free: there is no available information on which op / branch is currently being converted.
As a consequence, bare ptr convention cannot be handled as an argument materialization: it would apply irrespectively of the parent op.
This doesn't typecheck in the case of non-funcOp and we would see cases where a memref descriptor would be inserted in place of the pointer in another memref descriptor.

For now the proper behavior is to revert to a specific BarePtrFunc implementation and drop the blanket argument materialization logic.

This reverts the relevant piece of the conversion to LLVM to what it was before https://reviews.llvm.org/D105880 and adds a relevant test and documentation to avoid the mistake by whomever attempts this again in the future.

Reviewed By: arpith-jacob

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




More information about the All-commits mailing list