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]

Fwd: [PATCH] Hot/cold partitioning fixes



We accidentally have not been CC'ing the list on our messages. I'm fixing that
now. This is the first of three messages.


-- Caroline Tice
ctice@apple.com

Begin forwarded message:

From: Zack Weinberg <zack@codesourcery.com>
Date: Sat Mar 12, 2005  3:10:37 PM US/Pacific
To: Caroline Tice <ctice@apple.com>
Subject: Re: [PATCH] Hot/cold partitioning fixes


My most important concern: Could you talk a little about why you now impose the constraint that all the 'hot' blocks come before all the 'cold' blocks? The need is not obvious to me, and it seems to cause a substantial number of complications (esp. in bb-reorder.c).

I would also like to point out that this construct

+ 	  {
+ 	    len = strlen (UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
+ 	    unlikely_text_section_name = xmalloc (len+1 * sizeof (char));
+ 	    strcpy (unlikely_text_section_name,
+ 		    UNLIKELY_EXECUTED_TEXT_SECTION_NAME);
+ 	  }

would be better spelled

          unlikely_text_section_name
            = xstrdup (UNLIKELY_EXECUTED_TEXT_SECTION_NAME);

Furthermore, never write "sizeof(char)" -- it is 1 by definition.

I will provide more detailed comments in a day or two.

zw



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