OSDN Git Service

[mlir] Introduce bare ptr calling convention for MemRefs in LLVM dialect
authorDiego Caballero <diego.caballero@intel.com>
Fri, 31 Jan 2020 23:18:58 +0000 (15:18 -0800)
committerDiego Caballero <diego.caballero@intel.com>
Fri, 31 Jan 2020 23:19:38 +0000 (15:19 -0800)
commite5aaf30cf1ab03417c38a3df2482f76e673511a0
tree0d8ba51d7e1957b724d6b793b592ebbd6563a0eb
parent27684ae66d5545f211c0ac4393d0ba2bf3b5b47c
[mlir] Introduce bare ptr calling convention for MemRefs in LLVM dialect

Summary:
This patch introduces an alternative calling convention for
MemRef function arguments in LLVM dialect. It converts MemRef
function arguments to LLVM bare pointers to the MemRef element
type instead of creating a MemRef descriptor. Bare pointers are
then promoted to a MemRef descriptors at the beginning of the
function. This calling convention is only enabled with a flag.

Reviewers: ftynse, bondhugula, nicolasvasilache, rriddle, mehdi_amini

Reviewed By: ftynse, rriddle, mehdi_amini

Subscribers: Joonsoo, flaub, merge_guards_bot, jholewinski, mehdi_amini, rriddle, jpienaar, burmako, shauheen, antiagainst, csigg, arpith-jacob, mgester, lucyrfox, herhut, aartbik, liufengdb, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D72802
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h
mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
mlir/lib/Conversion/StandardToLLVM/ConvertStandardToLLVM.cpp
mlir/test/Conversion/StandardToLLVM/convert-dynamic-memref-ops.mlir [moved from mlir/test/Conversion/StandardToLLVM/convert-memref-ops.mlir with 64% similarity]
mlir/test/Conversion/StandardToLLVM/convert-static-memref-ops.mlir [new file with mode: 0644]
mlir/test/mlir-cpu-runner/bare_ptr_call_conv.mlir [new file with mode: 0644]