qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 3/9] tcg/optimizer: rework copy progagation


From: Richard Henderson
Subject: Re: [Qemu-devel] [PATCH 3/9] tcg/optimizer: rework copy progagation
Date: Wed, 19 Sep 2012 14:41:44 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:15.0) Gecko/20120828 Thunderbird/15.0

On 09/19/2012 01:00 PM, Aurelien Jarno wrote:
> The copy propagation pass tries to keep track of what is a copy of what
> and what has copy of what, and in addition it keep a circular list of
> of all the copies. Unfortunately this doesn't fully work: a mov from
> a temp which has a state "COPY" changes it into a state "HAS_COPY".
> Later when this temp is used again, it is considered has not having
> copy and thus no propagation is done.
> 
> This patch fixes that by removing the hiearchy between copies, and thus
> only keeping a "COPY" state both meaning "is a copy" and "has a copy".
> The decision of which copy to use is deferred to the actual temp
> replacement. At this stage there is not one best choice to do, but only
> better choices than others. For doing the best choice the operation
> would have to be parsed in reversed to know if a temp is going to be
> used later or not. That what is done by the liveness analysis. At this
> stage it is known that globals will always be live, that local temps
> will be dead at the end of the translation block, and that the temps
> will be dead at the end of the basic block. This means that this stage
> should try to replace temps by local temps or globals and local temps
> by globals.
> 
> It also brings the advantage of knowing if a temp is a copy of another,
> which can improve the various optimizations.
> 
> Signed-off-by: Aurelien Jarno <address@hidden>

Reviewed-by: Richard Henderson <address@hidden>


r~



reply via email to

[Prev in Thread] Current Thread [Next in Thread]