[all-commits] [llvm/llvm-project] 6c6b48: [BasicAA] Clean up calculation of FMRB from attrib...

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Sep 23 03:05:57 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6c6b48434ed85841f147c789a96a309e1fff16ae
      https://github.com/llvm/llvm-project/commit/6c6b48434ed85841f147c789a96a309e1fff16ae
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-09-23 (Fri, 23 Sep 2022)

  Changed paths:
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp

  Log Message:
  -----------
  [BasicAA] Clean up calculation of FMRB from attributes

The current implementation for call sites is pretty convoluted
when you take the underlying implementation of the used APIs
into account. We will query the call site attributes, and then
fall back to the function attributes while taking into account
operand bundles. However, getModRefBehavior() already has it's
own (more accurate) logic for combining call-site FMRB with
function FMRB.

Clean this up by extracting a function that only fetches FMRB
from attributes, which can be directly used in getModRefBehavior()
for functions, and needs to be combined with an operand-bundle
respecting fallback in the call site case.

One caveat (that makes this non-NFC) is that CallBase function
attribute lookups allow using attributes from functions with
mismatching signature. To ensure we don't regress quality, do
the same for the function FMRB fallback.




More information about the All-commits mailing list