Better HN
topnewbestaskshowjobs
Log inSign up

yroux

4 karma · joined Apr 14, 2021 (5y ago) · 6 submissions

Submissions

comment 5y ago · link · parent

Yes I agree, that's why function outlining is used for hot/cold splitting and partial inlining, in our case Machine Outlining is really dedicated to code size reduction.

comment 5y ago · link · parent

Well, the examples are simplified to present the concept of outlining. In the first example calc_X and OUTLINED_FUNCTION_0 are functions and not basic blocks, thus they are not guaranteed to placed in that order, but I agree, if they were consecutives blocks the last call should have ben removed.

To give more details on the LLVM optimization pipeline there are only two passes which run after the Machine Outliner for ARM before code emission (ConstantIslands and LowOverheadLoops) because they are dependent upon block layout and size.

comment 5y ago · link · parent

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

comment 5y ago · link · parent

The focus is code size, but in terms of performance I don't have numbers to report but on average you can expect a regression around 2%, but it will depend of call latency of core and is also impacted by cache effects, so in some cases you can have a performance improvement

comment 5y ago · link · parent

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.