[PATCH 3/3] Avoid emitting useless instructions in mips_process_sync_loop.

Richard Sandiford rdsandiford@googlemail.com
Wed Jun 13 19:01:00 GMT 2012


Maxim Kuvyrkov <maxim@codesourcery.com> writes:
> +  /* Don't bother setting returns that are never used.  */
> +  if (cmp && find_reg_note (insn, REG_UNUSED, cmp))
> +    cmp = 0;
> +  if (required_oldval && find_reg_note (insn, REG_UNUSED, required_oldval))
> +    required_oldval = 0;

required_oldval is an important input (not output).  We can't drop it.
I suppose we could replace oldval with AT if the non-AT register isn't used,
but I'm not sure it's worth it.

The CMP part is OK though.

Richard



More information about the Gcc-patches mailing list