[all-commits] [llvm/llvm-project] f96ea5: [AA] Do not track Must in ModRefInfo

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Jul 31 22:18:43 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f96ea53e892e0dfc1ee778868c1ed33616b95a82
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-08-01 (Mon, 01 Aug 2022)

  Changed paths:
    M llvm/include/llvm/Analysis/AliasAnalysis.h
    M llvm/include/llvm/Analysis/AliasAnalysisEvaluator.h
    M llvm/include/llvm/Analysis/MemorySSA.h
    M llvm/lib/Analysis/AliasAnalysis.cpp
    M llvm/lib/Analysis/AliasAnalysisEvaluator.cpp
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/lib/Analysis/GlobalsModRef.cpp
    M llvm/lib/Analysis/MemoryDependenceAnalysis.cpp
    M llvm/lib/Analysis/MemorySSA.cpp
    M llvm/test/Analysis/BasicAA/args-rets-allocas-loads.ll
    M llvm/test/Analysis/BasicAA/atomic-memory-intrinsics.ll
    M llvm/test/Analysis/BasicAA/call-attrs.ll
    M llvm/test/Analysis/BasicAA/cs-cs.ll
    M llvm/test/Analysis/BasicAA/libfuncs.ll
    M llvm/test/Analysis/MemorySSA/basicaa-memcpy.ll
    M llvm/test/Analysis/MemorySSA/call-bitcast.ll
    M llvm/test/Analysis/MemorySSA/optimize-use.ll
    M llvm/test/Analysis/MemorySSA/phi-translation.ll
    M llvm/test/Analysis/MemorySSA/print-walker.ll
    M llvm/test/Analysis/MemorySSA/scalable-vec.ll
    M llvm/unittests/Analysis/MemorySSATest.cpp

  Log Message:
  [AA] Do not track Must in ModRefInfo

getModRefInfo() queries currently track whether the result is a
MustAlias on a best-effort basis. The only user of this functionality
is the optimized memory access type in MemorySSA -- which in turn
has no users. Given that this functionality has not found a user
since it was introduced five years ago (in D38862), I think we
should drop it again.

The context is that I'm working to separate FunctionModRefBehavior
to track mod/ref for different location kinds (like argmem or
inaccessiblemem) separately, and the fact that ModRefInfo also has
an unrelated Must flag makes this quite awkward, especially as this
means that NoModRef is not a zero value. If we want to retain the
functionality, I would probably split getModRefInfo() results into
a part that just contains the ModRef information, and a separate
part containing a (best-effort) AliasResult.

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

More information about the All-commits mailing list