On 03/21/2011 08:18 PM, Nathan Froyd wrote:
> +/* Insert PATTERN before BEFORE, setting its INSN_LOCATION to LOC.
> +   MAKE_RAW indicates how to turn PATTERN into a real insn.  INSNP
> +   indicates if PATTERN is meant for an INSN as opposed to a JUMP_INSN,
> +   CALL_INSN, etc.  */
> +
> +static rtx
> +emit_pattern_before_setloc (rtx pattern, rtx before, int loc, bool insnp,
> +                         rtx (*make_raw) (rtx))
>  {
>    rtx first = PREV_INSN (before);
> -  rtx last = emit_insn_before_noloc (pattern, before, NULL);
> +  rtx last = emit_pattern_before_noloc (pattern, before,
> +                                        insnp ? before : NULL_RTX,
> +                                        NULL, make_raw);
>  
> -  if (pattern == NULL_RTX || !loc)
> +  if (pattern == NULL_RTX || (!loc && insnp))
>      return last;
>  
> -  if (!first)
> +  if (!first && insnp)
>      first = get_insns ();

Is this not merely indicative of a bug in one or more of the functions?
Why would recording LOC be dependent on INSNP?


r~

Reply via email to