[all-commits] [llvm/llvm-project] 4a579a: [GlobalsModRef] Don't override getModRefBehavior()...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Jul 7 01:36:00 PDT 2022


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

  Changed paths:
    M llvm/include/llvm/Analysis/GlobalsModRef.h
    M llvm/lib/Analysis/GlobalsModRef.cpp
    M llvm/test/Analysis/GlobalsModRef/purecse.ll

  Log Message:
  -----------
  [GlobalsModRef] Don't override getModRefBehavior() for CallBase

BasicAA will already call getModRefBehavior() on the Function of
the CallBase if there are no operand bundles. This happens through
getBestAAResults(), i.e. it is a recursive call that will query
other AA providers, not just the BasicAA implementation.

As such, there is no need to reimplement the same functionality
in GlobalsModRef, a combination of BasicAA and GlobalsModRef already
handles it. This does mean that this no longer works under
-disable-basic-aa, but that's a testing only option.




More information about the All-commits mailing list