[all-commits] [llvm/llvm-project] 8d58c8: Reapply [InstCombine] Don't check for alloc fn bef...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Jul 21 02:55:15 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d58c8e57b2769e640a33d7ad4b57014c3d2df99
      https://github.com/llvm/llvm-project/commit/8d58c8e57b2769e640a33d7ad4b57014c3d2df99
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-07-21 (Thu, 21 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/deref-alloc-fns.ll

  Log Message:
  -----------
  Reapply [InstCombine] Don't check for alloc fn before fetching alloc size

Reapply the patch with getObjectSize() replaced by getAllocSize().
The former will also look through calls that return their argument,
and we'll end up placing dereferenceable attributes on intrinsics
like llvm.launder.invariant.group. While this isn't wrong, it also
doesn't seem to be particularly useful. For now, use getAllocSize()
instead, which sticks closer to the original behavior of this code.

-----

This code is just interested in the allocsize, not any other
allocator properties.




More information about the All-commits mailing list