[all-commits] [llvm/llvm-project] 52b86d: [MemorySSA] Use provided memory location even if i...

Nikita Popov via All-commits all-commits at lists.llvm.org
Wed Nov 4 11:30:49 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 52b86d35a401eaaeaffbd5ed99b0cd3f4250254d
      https://github.com/llvm/llvm-project/commit/52b86d35a401eaaeaffbd5ed99b0cd3f4250254d
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2020-11-04 (Wed, 04 Nov 2020)

  Changed paths:
    M llvm/lib/Analysis/MemorySSA.cpp
    M llvm/unittests/Analysis/MemorySSATest.cpp

  Log Message:
  -----------
  [MemorySSA] Use provided memory location even if instruction is call

If getClobberingMemoryAccess() is called with an explicit
MemoryLocation, but the starting access happens to be a call, the
provided location is currently ignored, and alias analysis queries
will be performed against the call instruction instead. Something
similar happens if the starting access is a load with a MemoryDef.

Change the implementation to not set Q.Inst in the first place if
we want to perform a MemoryLocation-based query, to make sure it
can't be turned into an Instruction-based query along the way...

Additionally, remove the special handling that lifetime.start
intrinsics currently get. They simply report NoAlias for clobbers
between lifetime.start and other calls, but that's obviously not
right if the other call is something like a memset or memcpy. The
default behavior we get from getModRefInfo() will already do the
right thing here.

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




More information about the All-commits mailing list