Currently, code hoisting only checks immediately-dominated blocks for expressions to hoist. I wonder if limiting the search for expressions is intentional. This patch makes code hoisting search through all dominated blocks for expressions to hoist. On one hand, hoisting expressions from all dominated blocks, not just the immediate dominees, provides significantly greater unification opportunities. On the other hand, it can also substantially extend live ranges of pseudos, and increase register pressure. Even considering the negatives, hoisting expressions from non-immediate dominees seems like the right choice to me. Most expressions that can be moved several basic blocks up are constants, and IRA/reload should be able to rematerialize those under high register pressure. On the flip-side, if an expression is complex, than it would be less costly to spill/restore it instead of calculating it in dominated blocks. A compromise may be to limit the depth of search with a parameter. OK to apply? Thank you, -- Maxim Kuvyrkov CodeSourcery maxim@codesourcery.com (650) 331-3385 x724