News for hackers. Stuff that matters.
Re:Reducing code size with LLVM Machine Outliner on 32-bit A... by viraptor on Wednesday April 14, 2021 @09:09AM (#26806540)
I'm surprised that cache sizes and jump distance were not mentioned. Would that mean the size reduction is good enough that we're safely ignoring potential fetch of another page of code?
Re:Reducing code size with LLVM Machine Outliner on 32-bit A... by cesaref on Wednesday April 14, 2021 @10:15AM (#26807349)
Yes, I noticed this omission. It would be helpful to at least discuss the performance implications of this. I imagine the target audience are compiling for limited memory embedded devices where reducing the memory pressure could allow a cheaper SoC to be used where performance is not a concern.

From a performance perspective, I was wondering how this would interact with inlining, as there is the potential to inline and then extract more generalised call sequences and hence get better performance without the memory bloat from inlining. Definitely sounds like an interesting option.

Re:Reducing code size with LLVM Machine Outliner on 32-bit A... by yroux on Wednesday April 14, 2021 @10:32AM (#26807605)
Yes that's it, I wanted to put the focus on code size but maybe I should have said a word about performance as well.

I replied to the speed question in a previous comment, but can put it here as well, I don't have exact numbers to report but on average you can expect a regression around 2%, but it will depend of call latency of the core and is also impacted by cache effects, so in some cases you can have a performance improvement

Re:Reducing code size with LLVM Machine Outliner on 32-bit A... by yroux on Wednesday April 14, 2021 @10:23AM (#26807472)
The focus is pure code size reduction here and it doesn't look at the cache locality or performance which might be improved if the size reduction avoids some i-cache misses or not but that's a price to pay.
Re:Reducing code size with LLVM Machine Outliner on 32-bit A... by wyldfire on Wednesday April 14, 2021 @10:45AM (#26807777)
With a code size reduction like this, I'd expect an icache hit ratio improvement. But to your point - do we have to add more trampolines to critical paths? If so it might not be a net performance improvement.

The fact that so many other architectures enable it seem to hint that it would likely pay off for arm-32 too.