[all-commits] [llvm/llvm-project] 92d55e: [MemoryBuiltins] Remove isNoAliasFn() in favor of ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jan 10 00:18:30 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 92d55e7336db8597e90eefcdd72bc33ef553a454
      https://github.com/llvm/llvm-project/commit/92d55e7336db8597e90eefcdd72bc33ef553a454
  Author: Nikita Popov <npopov at redhat.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/Analysis/MemoryDependenceAnalysis.cpp
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/GVN/malloc-load-removal.ll
    M llvm/unittests/Analysis/MemoryBuiltinsTest.cpp

  Log Message:
  -----------
  [MemoryBuiltins] Remove isNoAliasFn() in favor of isNoAliasCall()

We currently have two similar implementations of this concept:
isNoAliasCall() only checks for the noalias return attribute.
isNoAliasFn() also checks for allocation functions.

We should switch to only checking the attribute. SLC is responsible
for inferring the noalias return attribute for non-new allocation
functions (with a missing case fixed in
https://github.com/llvm/llvm-project/commit/348bc76e3548c52dbcd442590ca0a7f5b09b7534).
For new, clang is responsible for setting the attribute,
if -fno-assume-sane-operator-new is not passed.

Differential Revision: https://reviews.llvm.org/D116800




More information about the All-commits mailing list