This is the mail archive of the gcc-patches@gcc.gnu.org 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]
Other format: [Raw text]

Re: [patch RFA middle-end] Fix PR target/41993


> 2012-11-05  Uros Bizjak  <ubizjak@gmail.com>
> 	    Kaz Kojima  <kkojima@gcc.gnu.org>
> 
> 	PR target/41993
> 	* mode-switching.c (create_pre_exit): Set return_copy to
> 	last_insn when copy_start is a pseudo reg.

OK, thanks.  The number of special cases dealt with in the function is on the 
verge of making it barely understandable though.  Why couldn't a backward scan 
based only on:

		    /* If the return register is not likely spilled, - as is
		       the case for floating point on SH4 - then it might
		       be set by an arithmetic operation that needs a
		       different mode than the exit block.  */
		    for (j = n_entities - 1; j >= 0; j--)
		      {
			int e = entity_map[j];
			int mode = MODE_NEEDED (e, return_copy);

			if (mode != num_modes[e] && mode != MODE_EXIT (e))
			  break;
		      }

(with a few shortcuts to speed it up) be sufficient?

-- 
Eric Botcazou


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