[PATCH] D74211: [mlir] use unpacked memref descriptors at function boundaries

Diego Caballero via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 13 17:16:31 PST 2020


dcaballe added a comment.

Unfortunately, this commit is breaking the lowering of the `noalias` attribute to LLVM when the bare pointer calling convention is used. `@check_noalias` test in `convert-static-memref-ops.mlir` passes successfully but it seems that the problem happens only when more than one argument carries the attribute. For example, this test will fail if you modify it as follows:

  --- a/mlir/test/Conversion/StandardToLLVM/convert-static-memref-ops.mlir
  +++ b/mlir/test/Conversion/StandardToLLVM/convert-static-memref-ops.mlir
  @@ -3,8 +3,9 @@
   // RUN: mlir-opt -convert-std-to-llvm='use-bare-ptr-memref-call-conv=1' -split-input-file %s | FileCheck %s --check-prefix=BAREPTR
  
   // BAREPTR-LABEL: func @check_noalias
  +// BAREPTR-SAME: %{{.*}}: !llvm<"float*"> {llvm.noalias = true},
   // BAREPTR-SAME: %{{.*}}: !llvm<"float*"> {llvm.noalias = true}
  -func @check_noalias(%static : memref<2xf32> {llvm.noalias = true}) {
  +func @check_noalias(%static1 : memref<2xf32> {llvm.noalias = true}, %static2 : memref<2xf32> {llvm.noalias = true}) {
       return
   }

It would be great if someone could have a look at this quickly or revert the commit if this is not blocking for you.
I'll try to take a look tomorrow if nobody hasn't.

Thanks!


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D74211/new/

https://reviews.llvm.org/D74211





More information about the llvm-commits mailing list