This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Jump threading fix II
> Here are some codes from your change:
>
> set1 = pc_set (e->src->end);
> set2 = pc_set (b->end);
> if (((e->flags & EDGE_FALLTHRU) != 0)
> != (XEXP (SET_SRC (set1), 0) == pc_rtx))
> reverse1 = true;
>
> cond1 = XEXP (SET_SRC (set1), 0);
> cond2 = XEXP (SET_SRC (set2), 0);
> if (reverse1)
> code1 = reversed_comparison_code (cond1, b->end);
> else
> code1 = GET_CODE (cond1);
>
> code2 = GET_CODE (cond2);
> reversed_code2 = reversed_comparison_code (cond2, b->end);
>
> if (!comparison_dominates_p (code1, code2)
> && !comparison_dominates_p (code1, reversed_code2))
> return NULL;
>
> Could you please double check if
>
> if (((e->flags & EDGE_FALLTHRU) != 0)
> != (XEXP (SET_SRC (set1), 0) == pc_rtx))
> reverse1 = true;
>
> and
>
> if (reverse1)
> code1 = reversed_comparison_code (cond1, b->end);
> else
> code1 = GET_CODE (cond1);
>
> are ok? Since your change causes the mips bootstrap failure, may I
> suggest you go over
This should be OK - the code1 is always reversed in order to be true to
get into the block and code2 is kept in the original form.
WHen choosing the outgoing edges I need to check whether code2 dominates
and choose else or if version of it.
There has been the typo in operand number. Now I am getting bootstrap
failure, but it is unrelated to threading - even if I disable it it fails.
Other emails seems to suggest that the unrelated problem has been fixed.
>
> http://gcc.gnu.org/ml/gcc-patches/2001-12/msg01658.html
>
> line by line and convince yourself they are 100% correct?
I did that about 3 times - thats why I sent the fixes to hypotetical
bugs (such as hard regnos etc). The MIPS bug has been the typo/thinko
at very end of thread_jump.
Are you still having problems today?
Hope not :)
Honza
>
> Thanks.
>
>
> H.J.