[all-commits] [llvm/llvm-project] 84ea23: [BasicAA] Handle scalable type sizes with constant...

David Green via All-commits all-commits at lists.llvm.org
Mon Feb 5 03:21:03 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 84ea236af9f36d409d2c45c66f8a8b6eb027935d
      https://github.com/llvm/llvm-project/commit/84ea236af9f36d409d2c45c66f8a8b6eb027935d
  Author: David Green <david.green at arm.com>
  Date:   2024-02-05 (Mon, 05 Feb 2024)

  Changed paths:
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/test/Analysis/AliasSet/memloc-vscale.ll
    M llvm/test/Analysis/BasicAA/vscale.ll

  Log Message:
  -----------
  [BasicAA] Handle scalable type sizes with constant offsets (#80445)

This is a separate, but related issue to #69152 that was attempting to improve
AA with scalable dependency distances. This patch attempts to improve when
there are scalable accesses with a constant offset between them. We happen to
get a report of such a thing recently, where so long as the vscale_range is
known, the maximum size of the access can be assessed and better aliasing
results can be returned.

The Upper range of the vscale_range, along with known part of the typesize are
used to prove that Off >= CR.upper * LSize. It does not try to produce
PartialAlias results at the moment from the lower vscale_range. It also enables
the added benefit of allowing better alias analysis when the RHS of the two
values is scalable, but the LHS is normal and can be treated like any other
aliasing query.




More information about the All-commits mailing list