[all-commits] [llvm/llvm-project] c7c79d: [IR][DSE] Support non-malloc functions in malloc+m...

clubby789 via All-commits all-commits at lists.llvm.org
Wed Jun 4 00:35:41 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c7c79d259025f0e5edf778a46e03aeb6affd7c73
      https://github.com/llvm/llvm-project/commit/c7c79d259025f0e5edf778a46e03aeb6affd7c73
  Author: clubby789 <jamie at hill-daniel.co.uk>
  Date:   2025-06-04 (Wed, 04 Jun 2025)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/Attributes.h
    M llvm/lib/IR/Attributes.cpp
    M llvm/lib/IR/Verifier.cpp
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/test/Transforms/DeadStoreElimination/noop-stores.ll
    A llvm/test/Transforms/DeadStoreElimination/zeroed-missing.ll
    A llvm/test/Verifier/alloc-variant-zeroed.ll

  Log Message:
  -----------
  [IR][DSE] Support non-malloc functions in malloc+memset->calloc fold (#138299)

Add a `alloc-variant-zeroed` function attribute which can be used to
inform folding allocation+memset. This addresses
https://github.com/rust-lang/rust/issues/104847, where LLVM does not
know how to perform this transformation for non-C languages.

Co-authored-by: Jamie <jamie at osec.io>



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list