[all-commits] [llvm/llvm-project] d144ae: [MemoryBuiltins] Default to trivial mapper in getA...

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


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

  Changed paths:
    M llvm/include/llvm/Analysis/MemoryBuiltins.h
    M llvm/lib/Analysis/MemoryBuiltins.cpp

  Log Message:
  -----------
  [MemoryBuiltins] Default to trivial mapper in getAllocSize() (NFC)

Default getAllocSize() to use the trivial mapper. Also switch
from using std::function to function_ref.

Furthermore, update the doc comment to point out a subtle difference
between getAllocSize() and getObjectSize(): The latter may also
return something for calls that return their argument (via "returned"
attribute or special intrinsics like invariant groups).




More information about the All-commits mailing list