[all-commits] [llvm/llvm-project] a8601f: [MLIR] Generic 'malloc', 'aligned_alloc' and 'free...
ftynse via All-commits
all-commits at lists.llvm.org
Mon Jul 25 06:55:13 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a8601f11fbb753e552197c5aa835fd3c30c29fd3
https://github.com/llvm/llvm-project/commit/a8601f11fbb753e552197c5aa835fd3c30c29fd3
Author: Michele Scuttari <michele.scuttari at outlook.com>
Date: 2022-07-25 (Mon, 25 Jul 2022)
Changed paths:
M mlir/docs/TargetLLVMIR.md
M mlir/include/mlir/Conversion/LLVMCommon/LoweringOptions.h
M mlir/include/mlir/Conversion/Passes.td
M mlir/include/mlir/Dialect/LLVMIR/FunctionCallUtils.h
M mlir/lib/Conversion/MemRefToLLVM/MemRefToLLVM.cpp
M mlir/lib/Dialect/LLVMIR/IR/FunctionCallUtils.cpp
A mlir/test/Conversion/MemRefToLLVM/generic-functions.mlir
Log Message:
-----------
[MLIR] Generic 'malloc', 'aligned_alloc' and 'free' functions
When converted to the LLVM dialect, the memref.alloc and memref.free operations were generating calls to hardcoded 'malloc' and 'free' functions. This didn't leave any freedom to users to provide their custom implementation. Those operations now convert into calls to '_mlir_alloc' and '_mlir_free' functions, which have also been implemented into the runtime support library as wrappers to 'malloc' and 'free'. The same has been done for the 'aligned_alloc' function.
Reviewed By: ftynse
Differential Revision: https://reviews.llvm.org/D128791
Commit: 9c1d133c3a0256cce7f40e2e06966f84e8b99ffe
https://github.com/llvm/llvm-project/commit/9c1d133c3a0256cce7f40e2e06966f84e8b99ffe
Author: Alex Zinenko <zinenko at google.com>
Date: 2022-07-25 (Mon, 25 Jul 2022)
Changed paths:
M mlir/lib/ExecutionEngine/CRunnerUtils.cpp
M mlir/test/mlir-cpu-runner/utils.mlir
Log Message:
-----------
[mlir] move _mlir_alloc and friends to CRunnerUtils
These functions don't depend on the C++ runtime and therefore belong to
CRunnerUtils. Clean up the macros on the way as `_MSC_VER` indicates the
compiler, not the platform, which is indicated by `_WIN32` and will be
present when, e.g., compiling with minGW.
Reviewed By: rdzhabarov
Differential Revision: https://reviews.llvm.org/D130025
Compare: https://github.com/llvm/llvm-project/compare/281eb9223cf2...9c1d133c3a02
More information about the All-commits
mailing list