On 16/08/19 13:04, Robert Ellenberg wrote:
Hi All,
Has anyone tried to use link-time optimization in the realtime object
builds? I think the motion / TP build would be a good candidate for it, so
we could improve inlining of things like posemath.
Best,
Rob
Hi Rob,
In an ideal world, the inline code in question should be inserted by the
compiler,
removing the call and stack shuffling thus producing a faster binary.
What the compiler actually does sometimes differs.;-)
If the code is long, a couple of push/pops from the stack if negligible,
compared to the amount of binary code bloat you can get, sometimes at
the expense
of code sitting nicely in processor cache ready to be instantly called
again.
I think the only way to find out is to test it.
On the face of it, short functions, repeatedly used, should benefit from it.
Nothing in defining inlines should affect rt operation AFAIK,
we have shed loads of inlines and defined functions in the revised rtai
/ hal code in Machinekit.
(mostly wrapper functions and accessors etc. to cater for both legacy
code and the newer code)
cheers
_______________________________________________
Emc-developers mailing list
Emc-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/emc-developers