This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH 2/2] refactor emit_*_{after,before}{,_setloc} using common functions
On Tue, Mar 22, 2011 at 05:06:39PM -0700, Richard Henderson wrote:
> On 03/22/2011 04:13 PM, Nathan Froyd wrote:
> > rtx
> > emit_call_insn_before_setloc (rtx pattern, rtx before, int loc)
> > {
> > ...
> > if (pattern == NULL_RTX)
> > return last;
> >
> > first = NEXT_INSN (first);
> >
> > The jump_insn and debug_insn variants have identical behavior to
> > call_insn.
>
> AFAICT, the !loc test really ought to be loc != UNKNOWN_LOCATION,
> and ought to apply to all of the patterns. This makes sense once
> you look at the test written canonically -- no point in searching
> for the list of insns if there's no location to set.
Did you mean loc == UNKNOWN_LOCATION? Also, it looks like that's
conflating INSN_LOCATORs and location_ts; it seems like it'd be better
to keep them separate.
-Nathan