On 07/21/11 13:28, Richard Sandiford wrote:

> +static void
> +process_bypass_2 (decl_t model, decl_t out_insn_reserv, void *data)
> +{
> +  struct bypass_decl *bypass;
> +  decl_t in_insn_reserv;
> +
> +  in_insn_reserv = (decl_t) data;
> +  bypass = XCNEW (struct bypass_decl);
> +  bypass->latency = DECL_BYPASS (model)->latency;
> +  bypass->out_pattern = DECL_INSN_RESERV (out_insn_reserv)->name;
> +  bypass->in_pattern = DECL_INSN_RESERV (in_insn_reserv)->name;
> +  bypass->bypass_guard_name = DECL_BYPASS (model)->bypass_guard_name;
> +  bypass->out_insn_reserv = DECL_INSN_RESERV (out_insn_reserv);
> +  bypass->in_insn_reserv = DECL_INSN_RESERV (in_insn_reserv);
> +  insert_bypass (bypass);

Doesn't this create a duplicate bypass structure in the case where
you're not using a wildcard? Could check first whether out_pattern and
in_pattern of the existing decl_t match.

Otherwise OK I think.


Bernd

Reply via email to