[llvm] [CodeLayout] Size-aware machine block placement (PR #109711)
Zhaoxuan Jiang via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 21 18:50:48 PDT 2024
nocchijiang wrote:
> @nocchijiang we tried to modify the optimization so that it places cold blocks at the end of the layout. Unfortunately, there were no compressed/uncompressed size improvements over a set of large apps, including Swift-heavy ones. I did observe the behavior you describe (cold brk in the middle of the layout) but placing them at the end doesn't seem to be beneficial. (Theoretically, there might be some value of integrating block hotness into the placement, and i'd be happy to review diffs, if you find a good way of doing so)
@spupyrev Would you mind sharing the modification as a draft so that I could test it against our codebase? It may be related to the code quality/style that some poorly written code are more likely to result in excessive `brk`s. FYI, ~0.5% of the binary is made up of `brk` in one of our Swift apps.
https://github.com/llvm/llvm-project/pull/109711
More information about the llvm-commits
mailing list