[all-commits] [llvm/llvm-project] b2f933: [MemorySSA] Don't bail on phi starting access

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Mar 13 01:59:39 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b2f933a6ce838a24f5e9728126c71d3ba44a99be
      https://github.com/llvm/llvm-project/commit/b2f933a6ce838a24f5e9728126c71d3ba44a99be
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-03-13 (Sat, 13 Mar 2021)

  Changed paths:
    M llvm/lib/Analysis/MemorySSA.cpp
    M llvm/test/Transforms/MemCpyOpt/memcpy-in-loop.ll

  Log Message:
  -----------
  [MemorySSA] Don't bail on phi starting access

When calling getClobberingMemoryAccess() with MemoryLocation on a
MemoryPHI starting access, the walker currently immediately bails
and returns the starting access. This makes sense for the API that
does not accept a location (as we wouldn't know what clobber we
should be checking for), but doesn't make sense for the
MemoryLocation-based API. This means that it can't look through
a MemoryPHI if it's the starting access, but can if there is one
more non-clobbering def in between. This patch removes the limitation.

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




More information about the All-commits mailing list