This is the mail archive of the gcc-help@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: Do not spill variables/registers on the stack


Back to the topic, few things crossed my mind :

1) Register keyword is a "hint" to the compiler, and thus not
obligatory. We saw that for -O1 and above it is "useless hint", as it
is always ignored. Is it however always respected by GCC when -O0 ? If
yes - why is it a hint ? If no, in which cases it is not respected ?
Only when you assign more vars than you have reg, or GCC might ignore
it some other times even with -O0 ?

2) Is this behavior documented anywhere ? Can we find docs that note :
    a) that "regiser" keyword is not ignored only with -O0
    b) when -O0 in which cases it is taken into account and in which cases not.


BR,
Drasko


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