[all-commits] [llvm/llvm-project] d35366: [CaptureTracking] Correctly handle multiple uses i...

Nikita Popov via All-commits all-commits at lists.llvm.org
Sat Nov 7 02:31:40 PST 2020


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

  Changed paths:
    M llvm/lib/Analysis/CaptureTracking.cpp
    M llvm/unittests/Analysis/CaptureTrackingTest.cpp

  Log Message:
  -----------
  [CaptureTracking] Correctly handle multiple uses in one instruction

If the same value is used multiple times in the same instruction,
CaptureTracking may end up reporting the wrong use as being captured,
and/or report the same use as being captured multiple times.

Make sure that all checks take the use operand number into account,
rather than performing unreliable comparisons against the used value.

I'm not sure whether this can cause any problems in practice, but
at least some capture trackers (ArgUsesTracker, AACaptureUseTracker)
do care about which call argument is captured.




More information about the All-commits mailing list