[all-commits] [llvm/llvm-project] 195362: [MemoryBuiltins] Handle allocator attributes on ca...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Aug 9 06:23:21 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 195362929cd79c0202f73bcbab9a09b8a1a3beaa
      https://github.com/llvm/llvm-project/commit/195362929cd79c0202f73bcbab9a09b8a1a3beaa
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-08-09 (Fri, 09 Aug 2024)

  Changed paths:
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/test/Transforms/InstCombine/deref-alloc-fns.ll
    M llvm/test/Transforms/InstCombine/out-of-tree-allocator-optimizes-away.ll

  Log Message:
  -----------
  [MemoryBuiltins] Handle allocator attributes on call-site

We should handle allocator attributes not only on function
declarations, but also on the call-site. That way we can e.g.
also optimize cases where the allocator function is a virtual
function call.

This was already supported in some of the MemoryBuiltins helpers,
but not all of them. This adds support for allocsize, alloc-family
and allockind("free").



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