xla icon indicating copy to clipboard operation
xla copied to clipboard

Generalize copy elimination pattern.

Open copybara-service[bot] opened this issue 2 years ago • 0 comments
trafficstars

Generalize copy elimination pattern.

The current pattern only triggers when 1) the src is deallocated immediately after the copy and 2) the dst is allocated in the program.

  1. is usually the case immediately after the deallocation pass, but I can't prove it will always be the case after some reuse has happened.
  2. is not the case for out params and isn't really necessary.

This change lifts both of these restrictions.

copybara-service[bot] avatar Mar 20 '23 14:03 copybara-service[bot]