[all-commits] [llvm/llvm-project] d02c79: [MSSA] Don't require clone creation to succeed (#7...

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jan 8 01:21:39 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d02c7931d1be794a230943e300fec4172032e6a8
      https://github.com/llvm/llvm-project/commit/d02c7931d1be794a230943e300fec4172032e6a8
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2024-01-08 (Mon, 08 Jan 2024)

  Changed paths:
    M llvm/lib/Analysis/MemorySSAUpdater.cpp
    A llvm/test/Transforms/SimpleLoopUnswitch/memssa-readnone-access.ll

  Log Message:
  -----------
  [MSSA] Don't require clone creation to succeed (#76819)

Sometimes, we create a MemoryAccess for an instruction, which is later
simplified (e.g. via devirtualization) such that the new instruction has
no memory effects anymore.

If we later clone the instruction (e.g. during unswitching), then MSSA
will not create a MemoryAccess for the new instruction, triggering an
assert.

Disable the assertion (by passing CreationMustSucceed=false) and adjust
getDefiningAccessForClone() to work correctly in that case.

This PR implements the alternative suggestion by alinas from
https://github.com/llvm/llvm-project/pull/76142.




More information about the All-commits mailing list