[all-commits] [llvm/llvm-project] 47abd8: [CaptureTracking] Don't require offset to stay the...

Nikita Popov via All-commits all-commits at lists.llvm.org
Tue Jun 2 07:26:31 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 47abd870986690ed50eab4de59c9dffa56ac24b7
      https://github.com/llvm/llvm-project/commit/47abd870986690ed50eab4de59c9dffa56ac24b7
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2026-06-02 (Tue, 02 Jun 2026)

  Changed paths:
    M llvm/lib/Analysis/AliasAnalysis.cpp
    M llvm/lib/Analysis/CaptureTracking.cpp
    M llvm/test/Transforms/FunctionAttrs/writeonly.ll

  Log Message:
  -----------
  [CaptureTracking] Don't require offset to stay the same (#201106)

For isIntrinsicReturningPointerAliasingArgumentWithoutCapturing() we
don't need the offset to stay the same. Even if the intrinsic applies an
offset to the pointer (like ptrmask), we can still continue by analyzing
the return value of the intrinsic, rather than considering the intrinsic
itself capturing.

Also clarify that this needs to stay in sync with isEscapeSource()
specifically, not getUnderlyingObject() or DecomposeGEP (which isn't
even possible, as they use different values for the argument). This used
to be different historically.

This was set to true in fd72bf21c958ae2fdfaa8654df55367c72575d3a, which
set all users to true, so I don't believe there was a specific reason
for this choice.

I ran into this when trying to replace some home-grown code in
FunctionAttrs with CaptureTracking.



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