HomePhabricator

[CaptureTracking] Correctly handle multiple uses in one instruction

Authored by nikic on Sat, Nov 7, 2:19 AM.

Description

[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.

Details

Committed
nikicSat, Nov 7, 2:31 AM
Parents
rG89eed79c1fa8: [MLIR][SPIRVToLLVM] Added module name conversion
Branches
Unknown
Tags
Unknown