0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch

Maxim Kuvyrkov maxim@codesourcery.com
Thu Jun 24 17:11:00 GMT 2010


On 6/23/10 11:08 PM, Maxim Kuvyrkov wrote:
...
>> This can be addressed with a walk over the dominator tree after we
>> compute VBEout. Start with the root and descend in the tree keeping a
>> bitset of expressions that should be alive up the tree. If current node
>>
>> 1. has a single successor,
>> 2. has i'th expression set in VBEout,
>> 3. the successor has i'th expression set in VBEout,
>> 4. current node doesn't generate i'th expression,
>> 5. i'th expression is not marked in the bitset as required up the tree,
>>
>> than we can hoist i'th expression in the successor with the same result
>> as in the current node and not unnecessarily extend live ranges. There
>> maybe a couple more details to the above, but the problem should be
>> easily fixable.
>
> This is implemented as cleanup_code_hoist_vbeout() function. The
> solution it produces is OK from correctness point of view (it removes
> bits from VBEout), but, please, *check my reasoning* to make sure it
> doesn't remove from VBEout expressions it shouldn't.

There is a flaw in the implementation I posted yesterday.  VBEout sets 
have to be cleaned up considering data both downward and upward the 
dominator tree; see new example and comments in compute_code_hoist_vbeinout.

This updated patch corrects the cleaning routine and adds several 
comments to annotate its actions.

Does this look OK?

-- 
Maxim Kuvyrkov
CodeSourcery
maxim@codesourcery.com
(650) 331-3385 x724
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0005-Also-search-non-immediately-dominated-blocks-for-exp.ChangeLog
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100624/f7fb19e5/attachment.ksh>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: 0005-Also-search-non-immediately-dominated-blocks-for-exp.patch
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100624/f7fb19e5/attachment-0001.ksh>


More information about the Gcc-patches mailing list