This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: INSN_SCOPE changes break mips-elf
> On Thu, Jun 20, 2002 at 08:53:12PM +0200, Jan Hubicka wrote:
> > Any idea how to implement it in fast enought way given that block
> > numbers are not computed?
>
> /* If we've only got one scope, return it. */
> if (!s1)
> return s2;
> if (!s2)
> return s1;
>
> /* If one of the scopes is a child of the other,
> return the inner scope. */
> for (t = s1; t ; t = BLOCK_SUPERCONTEXT (t))
> if (t == s2)
> return s1;
>
> for (t = s2; t ; t = BLOCK_SUPERCONTEXT (t))
> if (t == s1)
> return s2;
What I am concerned about is the performance here. With deep enought
nesting we can get quadratic behaviour easilly especially if we call it
from places like combine I am shooting for. What do you think about
my other appraoch to just compute the numbers early?
Honza