xla
xla copied to clipboard
Generalize copy elimination pattern.
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.
- 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.
- is not the case for out params and isn't really necessary.
This change lifts both of these restrictions.