[all-commits] [llvm/llvm-project] e33a63: [mlir][Linalg] Employ finer-grained control of C i...

Nicolas Vasilache via All-commits all-commits at lists.llvm.org
Fri Apr 3 13:18:25 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e33a636e26349bf42557908766911654d60cb6c0
      https://github.com/llvm/llvm-project/commit/e33a636e26349bf42557908766911654d60cb6c0
  Author: Nicolas Vasilache <ntv at google.com>
  Date:   2020-04-03 (Fri, 03 Apr 2020)

  Changed paths:
    M mlir/lib/Conversion/LinalgToLLVM/LinalgToLLVM.cpp
    M mlir/test/mlir-cpu-runner/unranked_memref.mlir
    M mlir/test/mlir-cpu-runner/utils.mlir

  Log Message:
  -----------
  [mlir][Linalg] Employ finer-grained control of C interface emission

Summary:
Linalg makes it possible to interface codegen with externally precompiled HPC libraries. The mechanism to allow such interop uses a normalized ABI and the emission of C interface wrappers.

The mechanism controlling these C interface emission is too aggressive and makes it very easy to obtained undefined symbols for external function (e.g. the ones coming from libm).

This revision uses the newly introduced llvm.emit_c_interface function attribute which allows controlling this behavior at a function granularity. As a consequence LinalgToLLVM does not need to activate the C wrapper emission when adding the StdToLLVM patterns.

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




More information about the All-commits mailing list