|
|
|
|
|
by marklacey
2276 days ago
|
|
Not if it’s a library that you’re not compiling, like language runtimes or system libraries. LTO requires that you’re compiling all the code to get the benefits. I’m also not sure if either gcc or clang’s LTO does layout at the basic block level or at the function level. There is a lot of benefit from doing it at the basic block level. You can literally lay out all the code that runs at application start time so that it is mostly adjacent and fall-through from block to block during execution. This isn’t something you necessarily do instead of LTO, but rather something you can do in addition to it. |
|