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]

Add hot/cold attributes for labels


This is a patch I should have gone ahead and committed when I wrote it
against gcc 4.6, but... better late than never I suppose.

The Idea is to have some mechanism akin to __builtin_expect that can apply
to the edges created by asm goto.  We tossed around possible syntax additions
to the asm construct, but nothing we came up with looked easy to use.  In
the end it seemed fantastically cleaner to simply use the existing attribute
syntax and apply the existing hot/cold attributes to labels.

This patch by itself doesn't actually accomplish what we really want for use
in the kernel (which is why it didn't get committed before I guess), but it's
the user-visible portion that would enable further work.

Tested on x86_64 and committed.


r~


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