[all-commits] [llvm/llvm-project] 01d97a: [MLIR] Add support to use aligned_alloc to lower A...
Uday Bondhugula via All-commits
all-commits at lists.llvm.org
Wed Apr 8 02:40:52 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 01d97a35493a8a306bfaa3ceb3e6fa49b05dea89
https://github.com/llvm/llvm-project/commit/01d97a35493a8a306bfaa3ceb3e6fa49b05dea89
Author: Uday Bondhugula <uday at polymagelabs.com>
Date: 2020-04-08 (Wed, 08 Apr 2020)
Changed paths:
M mlir/include/mlir/Conversion/Passes.td
M mlir/include/mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h
M mlir/lib/Analysis/Utils.cpp
M mlir/lib/Conversion/StandardToLLVM/StandardToLLVM.cpp
M mlir/lib/Dialect/StandardOps/IR/Ops.cpp
M mlir/test/Conversion/StandardToLLVM/convert-dynamic-memref-ops.mlir
Log Message:
-----------
[MLIR] Add support to use aligned_alloc to lower AllocOp from std to llvm
Support to recognize and deal with aligned_alloc was recently added to
LLVM's TLI/MemoryBuiltins and its various optimization passes. This
revision adds support for generation of aligned_alloc's when lowering
AllocOp from std to LLVM. Setting 'use-aligned_alloc=1' will lead to
aligned_alloc being used for all heap allocations. An alignment and size
that works with the constraints of aligned_alloc is chosen.
Using aligned_alloc is preferable to "using malloc and adjusting the
allocated pointer to align for indexing" because the pointer access
arithmetic done for the latter only makes it harder for LLVM passes to
deal with for analysis, optimization, attribute deduction, and rewrites.
Differential Revision: https://reviews.llvm.org/D77528
More information about the All-commits
mailing list