Add hot/cold attributes for labels

Richard Guenther richard.guenther@gmail.com
Fri Jul 27 09:08:00 GMT 2012


On Thu, Jul 26, 2012 at 11:58 PM, Richard Henderson <rth@redhat.com> wrote:
> On 07/26/2012 02:41 PM, Richard Henderson wrote:
>> This is a patch...
>
> ... that I should have attached.  Bah.

Do we need to mark the labels so we preserve them?  Consider

 goto foo;

foo:
bar __attribute__((cold)):
  ...

so bar will be unused?  What about BB merging if we end up with

  <BB 3>:
      ..
  fallthru
  bar __attribute__((cold)):
     ...

should BB 3 inherit the coldness?  I think we no longer disable
BB merging if the destination has user labels.

Richard.



More information about the Gcc-patches mailing list