[all-commits] [llvm/llvm-project] e79ca7: [MemCpyOpt] Fix MemorySSA preservation

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Oct 13 12:39:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e79ca751fc2bea9f80c4df1eebf61fce3fd4f439
      https://github.com/llvm/llvm-project/commit/e79ca751fc2bea9f80c4df1eebf61fce3fd4f439
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-10-13 (Tue, 13 Oct 2020)

  Changed paths:
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
    M llvm/test/Transforms/MemCpyOpt/preserve-memssa.ll

  Log Message:
  -----------
  [MemCpyOpt] Fix MemorySSA preservation

moveUp() moves instructions, so we should move the corresponding
memory accesses as well. We should also move the store instruction
itself: Even though we'll end up removing it later, this gives us
a correct MemoryDef to replace.

The implementation is somewhat more complicated than it should be,
because we also handle the case where P does not have a memory
access due to a degnerate AA pipeline. Hopefully, the need for this
will go away in the future, when the rest of the pass is based on
MSSA.

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




More information about the All-commits mailing list