[PATCH] D92570: [clang] [Headers] Use the corresponding _aligned_free or __mingw_aligned_free in _mm_free
Martin Storsjö via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 3 10:58:02 PST 2020
mstorsjo added inline comments.
================
Comment at: clang/lib/Headers/mm_malloc.h:42
void *__mallocedMemory;
#if defined(__MINGW32__)
__mallocedMemory = __mingw_aligned_malloc(__size, __align);
----------------
rnk wrote:
> This has been here since 2011, and somehow nobody complained that we didn't use the corresponding `__mingw_aligned_free` API...
Due to https://github.com/mingw-w64/mingw-w64/blob/master/mingw-w64-headers/crt/malloc.h#L72 (which is included implicitly from stdlib.h), it hasn't been used much at all- maybe only when using the older mingw.org headers. But I'm considering suggesting to change that bit in the mingw-w64 headers (it's a bit of a mess when used with gcc's mm_malloc.h).
For msvc based configs it would have been noticable though. But I don't know how much `_mm_malloc` really is used...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D92570/new/
https://reviews.llvm.org/D92570
More information about the cfe-commits
mailing list