[all-commits] [llvm/llvm-project] d9872e: [CaptureTracking] Compute results with and without...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu May 7 08:10:05 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d9872ea95f198982b41f90a3d5e8109cf4c72d46
      https://github.com/llvm/llvm-project/commit/d9872ea95f198982b41f90a3d5e8109cf4c72d46
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2026-05-07 (Thu, 07 May 2026)

  Changed paths:
    M llvm/include/llvm/Analysis/AliasAnalysis.h
    M llvm/include/llvm/Analysis/CaptureTracking.h
    M llvm/lib/Analysis/BasicAliasAnalysis.cpp
    M llvm/lib/Analysis/CaptureTracking.cpp
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp

  Log Message:
  -----------
  [CaptureTracking] Compute results with and without return capture (#195857)

Currently PointerMayBeCaptured/FindEarliestEscape accept a
ReturnCaptures argument to determine whether returning the pointer
should be considered a capture. If you want to do a capture check for
both cases, you have to invoke the capture tracking API twice.

This PR instead changes the low level APIs to return a pair of capture
components, one where returns are considered non-capturing, and one
where they are considered capturing.

This is for use by https://github.com/llvm/llvm-project/pull/193939,
where AA wants both our usual captures-before (ignoring returns)
reasoning, and captures-anywhere (including returns). This will allow us
to do this in one (cached) query.



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