Ulrich Drepper <[email protected]> writes:
>
> It's not guaranteed to work in general. The problem to solve is that
> I know the function which is called is not clobbering any registers.
> If I leave it with the normal function call gcc has to spill
> registers. If I can hide the function call the generated code can be
> significantly better.
iirc the new shrink wrapping support that just went in was to address
problems like that. Perhaps try a mainline compiler?
But I agree that such an attribute would be useful. I would use it.
At least the Linux kernel has a couple such cases ("nasty inline asm to
hide register clobbering in calls") and it's always ugly and hard to
maintain.
-Andi
--
[email protected] -- Speaking for myself only