This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [4.5] Doloop improvement patches, 1/7
- From: Steven Bosscher <stevenb dot gcc at gmail dot com>
- To: Bernd Schmidt <bernds_cb1 at t-online dot de>, Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 9 Mar 2009 00:19:09 +0100
- Subject: Re: [4.5] Doloop improvement patches, 1/7
[ xf. http://gcc.gnu.org/ml/gcc-patches/2009-03/msg00320.html
Suggestions to do this better in gmail welcome... ]
Bernd Schmidt wrote:
> + CLEAR_REG_SET (this_altered);
> + note_stores (PATTERN (insn), mark_altered, this_altered);
> + if (CALL_P (insn))
> + {
> + int i;
> +
> + /* Kill all call clobbered registers. */
> + for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
> + if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i))
> + SET_REGNO_REG_SET (this_altered, i);
> + }
Why not use DF_INSN_DEFs here?
HmmmOK, so this code was there before. IIUC this could be written as:
df_ref *def_rec;
for (def_rec = DF_INSN_DEFS (insn); *def_rec; def_rec++)
SET_REGNO_REG_SET (this_altered, DF_REF_REGNO (*def_rec);
and mark_altered() (and the note_stores() call, and the loop over call
clobbered regs) could go away.
Maybe mark this with a FIXME?
Gr.
Steven