This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Genrecog bugfix version 2
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: Genrecog bugfix version 2
- From: Jan Hubicka <hubicka at atrey dot karlin dot mff dot cuni dot cz>
- Date: Sat, 7 Aug 1999 15:33:19 +0200
- Cc: egcs-patches at egcs dot cygnus dot com
- References: <19990725031225.23705@atrey.karlin.mff.cuni.cz> <19990725105243.C17200@cygnus.com>
> On Sun, Jul 25, 1999 at 03:12:25AM +0200, Jan Hubicka wrote:
> > + int cmp = strcmp (d1->position, d2->position);
> ...
> > + /* Try to find corresponding position in the second. */
> > + if (cmp < 0)
>
> I don't understand the use of strcmp to determine which
> of d1 or d2 to back out and test. Perhaps you were looking
> for the longer of two strings? Or perhaps we always know
> that one is a prefix of the longer?
After looking at the strings I've got impression that they contaions
letters and numbers to represent position in the insn and when I sort
them alphabetically I get exactly the order recog uses to match constraints.
In the situation I am shooting for, one string is longer, because it's tree
is deeper and second is "almost prefix" except it is one branch later.
I think we can use strlen comparison as well, but strcmp seems to be more
clear to me to represent that I need to syncronize.
Honza
>
>
> r~
--
OK. Lets make a signature file.
+-------------------------------------------------------------------------+
| Jan Hubicka (Jan Hubi\v{c}ka in TeX) hubicka@freesoft.cz |
| Czech free software foundation: http://www.freesoft.cz |
|AA project - the new way for computer graphics - http://www.ta.jcu.cz/aa |
| homepage: http://www.paru.cas.cz/~hubicka/, games koules, Xonix, fast |
| fractal zoomer XaoS, index of Czech GNU/Linux/UN*X documentation etc. |
+-------------------------------------------------------------------------+