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: Better estimations of costs in outof-ssa


On Thu, Jul 28, 2005 at 09:22:27AM +0200, Jan Hubicka wrote:
> ! 		{
> ! 		  /* Base costs on BB frequencies bounded by 1.  */
> ! 		  int cost = EDGE_FREQUENCY (PHI_ARG_EDGE (phi, x));
> ! 
> ! 		  if (!cost)
> ! 		    cost = 1;
> ! 		  if (optimize_size || !maybe_hot_bb_p (bb))
> ! 		    cost = 1;
> ! 		  /* Inserting copy on critical edge is more costy
> ! 		     than inserting it elsewhere.  */
> ! 		  if (EDGE_CRITICAL_P (PHI_ARG_EDGE (phi, x)))
> ! 		    cost *= 2;
> ! 		  add_coalesce (cl, p, p2, cost);

Please factor out this thrice duplicated code.


r~


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