redirect_edge_and_branch questions

Daniel Jacobowitz drow@false.org
Mon Oct 4 15:53:00 GMT 2004


On Mon, Oct 04, 2004 at 10:19:07AM -0400, Andrew MacLeod wrote:
> ??
> 
> Given an edge, don't you know either the percentage taken or edge count
> for that edge?  So if its being redirected, you deduct that edges count
> from the original destination block, redirect it, and add it in at the
> new destination's block. 
> 
> OR am I missing something about our implementation?

That's not a valid transformation.  I'm not much for ASCII block
diagrams but I'll try....

          A
         / \
        B   C
         \ /
          D
         / \
        E   F
         \ /
          G

Suppose you redirect B->D to E based on the knowledge that D is just a
conditional branch and matches A.  This doesn't change the execution
frequency of E.

-- 
Daniel Jacobowitz



More information about the Gcc mailing list