On Saturday, 7 April 2012 at 23:50:42 UTC, bearophile wrote:
Keep also in mind that D functions that contain ASM don't get inlined in DMD (and probably elsewhere too).
BTW: The GCC backend has a pretty powerful ASM support where inlining IS possible and you can simply say things like 'give me a free register which supports the XYZ operation' and the backend optimizer does the register juggling (such as saving any used registers on the stack first or choosing a free one) for you - which is essential for sensible inlining.
OK, that's not of much use on an architecture with a feeble register set such as i386, but it's a pretty powerful feature with architectures with lots of general registers such as m68k or SPARC.
But I'm drifting off... Cheers, Stefan