[all-commits] [llvm/llvm-project] c22975: [Clang] Propagate guaranteed alignment for malloc ...

Dávid Bolvanský via All-commits all-commits at lists.llvm.org
Fri Apr 23 02:07:50 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c2297544c04764237cedc523083c7be2fb3833d4
      https://github.com/llvm/llvm-project/commit/c2297544c04764237cedc523083c7be2fb3833d4
  Author: Dávid Bolvanský <david.bolvansky at gmail.com>
  Date:   2021-04-23 (Fri, 23 Apr 2021)

  Changed paths:
    M clang/include/clang/Basic/TargetInfo.h
    M clang/lib/CodeGen/CGCall.cpp
    A clang/test/CodeGen/alloc-fns-alignment.c

  Log Message:
  -----------
  [Clang] Propagate guaranteed alignment for malloc and others

LLVM should be smarter about *known* malloc's alignment and this knowledge may enable other optimizations.

Originally started as LLVM patch - https://reviews.llvm.org/D100862 but this logic should be really in Clang.

Reviewed By: rjmccall

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




More information about the All-commits mailing list