__attribute__((leafify)) support for
hints the compiler to inline all calls inside a function (f.i. a math kernel). It was integrated to gcc-4.1 with a different name, flatten.
Use like
void __attribute__((leafify)) runfast(void)
{
for (;;)
for (;;)
{
maybe_deep_template_hierarchy_call();
}
}
such function should then compile into a straight loop without any calls left. The 3.3 and 3.4 versions are slightly hacks where leafification may not succeed in some circumstances (3.3) and inlining behavior outside of leafified functions may be affected (3.4). The mainline and lno versions of the patch work as long as unit-at-a-time mode is activated (-O1 and beyond).