[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.
Loading
Please sign in to comment