This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: combine and noop moves, take 2

On Sun, Jul 22, 2001 at 09:23:06PM +0200, Jan Hubicka wrote:
> 	* basic-block.h (delete_noop_moves): Declare.
> 	* combine.c (combine_instructions): Call it.
> 	(recog_for_combine): Tolerate noop moves
> 	(distribute_notes): Force refresh when register dies at noop move.
> 	* flow.c (delete_noop_moves): Use BB structure; delete JUMP insns
> 	too.
> 	(life_analysis): Update delete_noop_moves call.
> 	(set_noop_p): Move too ...
> 	* rtlanal.c (noop_move_p): ... here.
> 	* rtl.h (noop_move_p): Declare.

Looks good.

I had a thought for a followup patch:

> !       /* Recognize all noop sets, these will be killed by followup pass.  */
> !       if (GET_CODE (pat) == SET && set_noop_p (pat))
> ! 	insn_code_number = INT_MAX;
> ! 	      if (REG_NOTE_KIND (note) == REG_DEAD
> ! 		  && ((place && noop_move_p (place))
> ! 		      || (place == 0

What if we enshrine INT_MAX as the meaning "a noop move", by


Then noop_move_p has a nice fast path to returning true for
this case.  It might not make that much difference, but at
least it would document a bit more what's going on.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]