This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Detect loops in find_comparison_args


Il 21/05/2012 17:54, Andrew Jenner ha scritto:
> This patch is a followup to the patch Sandra Loosemore made to fix
> PR50380 (see (http://gcc.gnu.org/ml/gcc-patches/2011-12/msg01402.html).
> That patch only detects fixed points, but Joseph Myers found a testcase
> which creates a cycle of length 2, causing find_comparison_args to stall
> even with the earlier patch.
> 
> This patch uses a pointer_set to detect cycles of any length and adds
> the new testcase to the test. I have successfully run bootstrap and
> regression tests. Okay to commit to mainline?

That's pretty heavy-weight.  Perhaps you can try the usual algorithm of
looking at x->next and x->next->next?

Paolo


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]