[PATCH] D77528: [MLIR] Add support to use aligned_alloc to lower AllocOp from std to llvm

Uday Bondhugula via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 8 02:40:01 PDT 2020


bondhugula marked 3 inline comments as done.
bondhugula added a comment.

In D77528#1968908 <https://reviews.llvm.org/D77528#1968908>, @ftynse wrote:

> > Everything's addressed now but you may want to take another look because I had completely missed the fact earlier that aligned_alloc only supports a size that is a multiple of alignment.
>
> I was going to ask what happened in case of `memref<?xvector<3xf32>>` but got distracted by the lambda discussion :)


The allocation size will be bumped to a multiple of the alignment. With `memref<?xvector<3xf32>`, if there is no alignment attribute, the next power of two larger than 12, i.e., 16, will be the alignment, and the allocation size will be bumped to a multiple of 16 ('cumulativeSize' will bumped up).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77528





More information about the llvm-commits mailing list