get_attr_* speedups

Richard Henderson rth@cygnus.com
Mon Aug 28 14:12:00 GMT 2000


On Mon, Aug 28, 2000 at 01:37:42AM +0200, Jan Hubicka wrote:
> + /* Wrappers around recog, split, peephole2 functions from insn-recog.c that
> +    does dirty work.  These functions just clear the recog_data cache.  */
> + int
> + recog (x0, insn, pnum_clobbers)
> + 	rtx x0, insn;
> + 	int *pnum_clobbers;
> + {
> +   recog_data.insn = NULL;
> +   which_alternative = -1;
> +   return recog_1 (x0, insn, pnum_clobbers);
> + }

I think you should just emit this code into the regular recog, etc.

> + void
> + extract_constrain_insn_cached (insn)
> +      rtx insn;
> + {
> +   extract_insn_cached (insn);
> +   if (!constrain_operands (reload_completed))
> +     fatal_insn_not_found (insn);
> + }
> + 
[...]
> +   /* In the caching mode don't recalculate when not required.  */
> +   if (which_alternative != -1
> +       && recog_data.insn)
> +     return 1;
> + 

I don't like splitting this into constrain_operands.  Is there any
reason not to have the -1 test in extract_constrain_insn_cached?


r~


More information about the Gcc-patches mailing list