[all-commits] [llvm/llvm-project] da46a2: [BasicAA] Add test for single arg phi in loop (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Sun Feb 14 10:42:07 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: da46a2a87bca044fe1577bb0ca674296848453b8
      https://github.com/llvm/llvm-project/commit/da46a2a87bca044fe1577bb0ca674296848453b8
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M llvm/test/Analysis/BasicAA/phi-aa.ll

  Log Message:
  -----------
  [BasicAA] Add test for single arg phi in loop (NFC)


  Commit: f197cf2126be3b224cadfe8b1cde9c05f638a0ea
      https://github.com/llvm/llvm-project/commit/f197cf2126be3b224cadfe8b1cde9c05f638a0ea
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-02-14 (Sun, 14 Feb 2021)

  Changed paths:
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/test/Analysis/BasicAA/phi-aa.ll

  Log Message:
  -----------
  [BasicAA] Merge aliasGEP code paths

At this point, we can treat the case of GEP/GEP aliasing and
GEP/non-GEP aliasing in essentially the same way. The only
differences are that we need to do an additional negative GEP base
check, and that we perform a bailout on unknown sizes for the
GEP/non-GEP case (the latter exists only to limit compile-time).

This change is not quite NFC due to the peculiar effect that
the DecomposedGEP for V2 can actually be non-trivial even if V2
is not a GEP. The reason for this is that getUnderlyingObject()
can look through LCSSA phi nodes, while stripPointerCasts() doesn't.
This can lead to slightly better results if single-entry phi nodes
occur inside a loop, where looking through the phi node via aliasPhi()
would subject it to phi cycle equivalence restrictions. It would
probably make sense to adjust pointer cast stripping (for AA) to
handle this case, and ensure consistent results.


Compare: https://github.com/llvm/llvm-project/compare/bc2e843839ee...f197cf2126be


More information about the All-commits mailing list