llvm-project/polly/lib/Analysis
Nikita Popov b1cd393f9e [AA] Tracking per-location ModRef info in FunctionModRefBehavior (NFCI)
Currently, FunctionModRefBehavior tracks whether the function reads
or writes memory (ModRefInfo) and which locations it can access
(argmem, inaccessiblemem and other). This patch changes it to track
ModRef information per-location instead.

To give two examples of why this is useful:

* D117095 highlights a weakness of ModRef modelling in the presence
  of operand bundles. For a memcpy call with deopt operand bundle,
  we want to say that it can read any memory, but only write argument
  memory. This would allow them to be treated like any other calls.
  However, we currently can't express this and have to say that it
  can read or write any memory.
* D127383 would ideally be modelled as a separate threadid location,
  where threadid Refs outside pre-split coroutines can be ignored
  (like other accesses to constant memory). The current representation
  does not allow modelling this precisely.

The patch as implemented is intended to be NFC, but there are some
obvious opportunities for improvements and simplification. To fully
capitalize on this we would also want to change the way we represent
memory attributes on functions, but that's a larger change, and I
think it makes sense to separate out the FunctionModRefBehavior
refactoring.

Differential Revision: https://reviews.llvm.org/D130896
2022-09-14 16:34:41 +02:00
..
DependenceInfo.cpp [Polly][MatMul] Abandon dependence analysis. 2022-06-29 17:20:05 -05:00
PolyhedralInfo.cpp Remove unneeded cl::ZeroOrMore for cl::opt/cl::list options 2022-06-05 00:31:44 -07:00
PruneUnprofitable.cpp [Polly] Mark classes as final by default. NFC. 2022-05-17 12:05:39 -05:00
ScopBuilder.cpp [AA] Tracking per-location ModRef info in FunctionModRefBehavior (NFCI) 2022-09-14 16:34:41 +02:00
ScopDetection.cpp [AA] Tracking per-location ModRef info in FunctionModRefBehavior (NFCI) 2022-09-14 16:34:41 +02:00
ScopDetectionDiagnostic.cpp [Polly] Reject regions entered by an indirectbr/callbr. 2021-09-27 18:49:11 -05:00
ScopGraphPrinter.cpp Remove unneeded cl::ZeroOrMore for cl::opt options 2022-06-04 00:10:42 -07:00
ScopInfo.cpp Use std::gcd (NFC) 2022-08-28 10:41:53 -07:00
ScopPass.cpp Make dependency between certain analysis passes transitive (reapply) 2021-05-05 15:17:55 +02:00