[all-commits] [llvm/llvm-project] 5265ac: [MemoryBuiltin] Add an API for checking if an unus...

Philip Reames via All-commits all-commits at lists.llvm.org
Mon Jan 10 15:43:52 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5265ac72c6686d73edcf5de37b019b64c814d00c
      https://github.com/llvm/llvm-project/commit/5265ac72c6686d73edcf5de37b019b64c814d00c
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2022-01-10 (Mon, 10 Jan 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/MemoryBuiltins.h
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/lib/Transforms/Utils/Local.cpp

  Log Message:
  -----------
  [MemoryBuiltin] Add an API for checking if an unused allocation can be removed [NFC]

Not all allocation functions are removable if unused.  An example of a non-removable allocation would be a direct call to the replaceable global allocation function in C++.  An example of a removable one - at least according to historical practice - would be malloc.




More information about the All-commits mailing list