Edge Rewrite
// HTMLRewriter · presentation

This page was redesigned at the edge.

Cloudflare fetched the original article and streamed it through HTMLRewriter to apply an entirely new visual system without rebuilding the source page.

Jump to content

Talk:Copy propagation

Page contents not supported in other languages.
Add topic
From Wikipedia, the free encyclopedia
Latest comment: 5 years ago by Arzg in topic Copy prop combined with other passes

Is there a name/optimization technique for copy propagation performed in reverse? ie) add r1, r0, r0; mov r0, r1; -> add r0, r0, r0 Themania (talk) 20:01, 22 June 2008 (UTC)Reply

@Themania: this is an example of constant propagation.

@kdcooper: Actually, this transformation might be better viewed as an instance of getting the assignment (of values to registers) right. In the graph-coloring register allocation world, this kind of thing might be handled with copy coalescing; another, simpler way of handling it would be via biased coloring. In that approach, the decision is made when the register allocator is looking for a place to keep the result of the add operation. The allocator would check to see if that live range is connected by a copy to any other live range and would try to select the color of that other live range. The result is the same.  Preceding unsigned comment added by Kdcooper (talkcontribs) 19:03, 21 April 2015 (UTC)Reply

Copy prop combined with other passes

[edit]

Ancedotally I've seen at least one production (shader) compiler that propagates fabs/fneg/fsat modifiers as part of a sophisticated copyprop pass. I'm not sure if this is described in the literature and belongs here, but it's worth noting copyprop isn't -just- about pure copies. Arzg (talk) 03:33, 23 March 2021 (UTC)Reply