From: Brian D. <br...@de...> - 2008-09-05 21:50:57
|
Paul Moore wrote: > Cool! I should learn to trust the compiler. But is there a way of doing > this for some functions in a source file, rather than all? (It's no big > deal, but it just saves me splitting up my source file). In gcc 4.4 there is a new feature that allows to specify function-specific options, e.g. void foo (void) __attribute__((__optimize__("omit-frame-pointer"))) { ... } But in reality I wouldn't lose too much sleep over it. Modern IA32 implementations are tuned to efficiently deal with the stack frame sequence of instructions since it's so common, so I can't imagine that it has a huge effect (though certainly not negligible.) Brian |