[all-commits] [llvm/llvm-project] 9d2f8e: [MSSAU] Clarify that the defining access does not ...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Aug 16 00:00:50 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9d2f8ecac88c73242c99e7b353ac985fc57f1ed3
      https://github.com/llvm/llvm-project/commit/9d2f8ecac88c73242c99e7b353ac985fc57f1ed3
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-08-16 (Wed, 16 Aug 2023)

  Changed paths:
    M llvm/include/llvm/Analysis/MemorySSAUpdater.h
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/lib/Transforms/Scalar/GVN.cpp
    M llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp

  Log Message:
  -----------
  [MSSAU] Clarify that the defining access does not matter (NFC)

New memory accesses are usually inserted by using one of the
createMemoryAccessXYZ() methods followed by insertUse() or
insertDef(). createMemoryAccessXYZ() accepts a defining access,
however this defining access will always be overwritten by
insertUse() / insertDef().

Update the documentation to clarify this, and stop passing
Definition to createMemoryAccessXYZ() if it's followed by
insertUse/insertDef.

Alternatively, we could also make insertUse / insertDef keep the
defining access if it is specified, and only recompute it if it's
missing.

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




More information about the All-commits mailing list