[all-commits] [llvm/llvm-project] e987fb: [BasicAA] Generalize recursive phi alias analysis

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Nov 29 01:30:23 PST 2020


  Branch: refs/heads/temp-test-main
  Home:   https://github.com/llvm/llvm-project
  Commit: e987fbdd85d6bb5964d9db7a729d6ec8b1dc2322
      https://github.com/llvm/llvm-project/commit/e987fbdd85d6bb5964d9db7a729d6ec8b1dc2322
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-11-29 (Sun, 29 Nov 2020)

  Changed paths:
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/test/Analysis/BasicAA/recphi.ll
    M llvm/test/CodeGen/Thumb2/mve-float32regloops.ll

  Log Message:
  -----------
  [BasicAA] Generalize recursive phi alias analysis

For recursive phis, we skip the recursive operands and check that
the remaining operands are NoAlias with an unknown size. Currently,
this is limited to inbounds GEPs with positive offsets, to
guarantee that the recursion only ever increases the pointer.

Make this more general by only requiring that the underlying object
of the phi operand is the phi itself, i.e. it it based on itself in
some way. To compensate, we need to use a beforeOrAfterPointer()
location size, as we no longer have the guarantee that the pointer
is strictly increasing.

This allows us to handle some additional cases like negative geps,
geps with dynamic offsets or geps that aren't inbounds.

Differential Revision: https://reviews.llvm.org/D91914




More information about the All-commits mailing list