[all-commits] [llvm/llvm-project] 6b0ff0: Extract utility function for checking initial valu...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Jan 7 08:44:27 PST 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6b0ff0969d0563d5263d0df6b37028fc1659c97e
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2022-01-07 (Fri, 07 Jan 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/MemoryBuiltins.h
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/Scalar/GVN.cpp
    M llvm/lib/Transforms/Scalar/NewGVN.cpp
    M llvm/test/Transforms/GVN/calloc-load-removal.ll

  Log Message:
  Extract utility function for checking initial value of allocation [NFC, try 2]

This is a reoccuring pattern, we can consolidate three copies into one.  The main motivation is to reduce usages of isMallocLike.

The original commit (which was quickly reverted) didn't account for the allocation function could be an invoke, test coverage for that case added in this commit.

More information about the All-commits mailing list