[all-commits] [llvm/llvm-project] c0955e: Introduce support for lib function aligned_alloc i...

Uday Bondhugula via All-commits all-commits at lists.llvm.org
Sun Mar 29 11:07:51 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: c0955edfd6ec51e9a3720f9bfc90bac2e511c06d
      https://github.com/llvm/llvm-project/commit/c0955edfd6ec51e9a3720f9bfc90bac2e511c06d
  Author: Uday Bondhugula <uday at polymagelabs.com>
  Date:   2020-03-29 (Sun, 29 Mar 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/MemoryBuiltins.h
    M llvm/include/llvm/Analysis/TargetLibraryInfo.def
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/lib/Analysis/TargetLibraryInfo.cpp
    M llvm/lib/Transforms/Utils/BuildLibCalls.cpp
    M llvm/test/Transforms/DeadStoreElimination/simple.ll
    M llvm/unittests/Analysis/TargetLibraryInfoTest.cpp

  Log Message:
  -----------
  Introduce support for lib function aligned_alloc in TLI / memory builtins

Aligned_alloc is a standard lib function and has been in glibc since
2.16 and in the C11 standard. It has semantics similar to malloc/calloc
for several analyses/transforms. This patch introduces aligned_alloc
in target library info and memory builtins. Subsequent ones will
make other passes aware and fix https://bugs.llvm.org/show_bug.cgi?id=44062

This change will also be useful to LLVM generators that need to allocate
buffers of vector elements larger than 16 bytes (for eg. 256-bit ones),
element boundary alignment for which is not typically provided by glibc malloc.

Signed-off-by: Uday Bondhugula <uday at polymagelabs.com>

Differential Revision: https://reviews.llvm.org/D76970




More information about the All-commits mailing list