[all-commits] [llvm/llvm-project] 46e04f: [MemorySSA] Handle MemoryDef optimized away during...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Dec 9 03:22:11 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 46e04f7fe5c0f01ba452489bb966bdf2d560a63d
      https://github.com/llvm/llvm-project/commit/46e04f7fe5c0f01ba452489bb966bdf2d560a63d
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-12-09 (Mon, 09 Dec 2024)

  Changed paths:
    M llvm/include/llvm/Analysis/MemorySSAUpdater.h
    M llvm/lib/Analysis/MemorySSAUpdater.cpp
    A llvm/test/Analysis/MemorySSA/loop-rotate-update.ll
    A llvm/test/Analysis/MemorySSA/pr116227.ll

  Log Message:
  -----------
  [MemorySSA] Handle MemoryDef optimized away during cloning (#117883)

When determining the replacement access during cloning, we currently
leave accesses for instructions that are not in the VMap alone. This is
correct if the instruction is not in VMap because it hasn't been cloned,
but not if it has been cloned and then removed. In that case, we should
walk up to the defining access, like in other simplification cases.

To distinguish the two cases, pass in a callback that queries whether
the instruction is part of the cloned region.

An alternative to this would be to delay removal of dead instructions in
SimpleLoopUnswitch until after MSSA cloning.

Fixes https://github.com/llvm/llvm-project/issues/116228.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list