[PATCH] D120305: [Driver] Default CLANG_DEFAULT_PIE_ON_LINUX to ON

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 1 01:47:06 PST 2022


nikic added a comment.

I've been looking into the compile-time regressions.

The large regression on sqlite3 is due to differences in inlining behavior. The inlining cost model is slightly different for PIC builds, because GEPs that are based on a global and have a variable offset are no longer considered free. In the sqlite3 case this leads to different inlining decisions, which ultimately lead to the large compile-time regression. I don't think there is anything immediately actionable here, it's just bad luck that the different cost modeling happens to push us across an arbitrary threshold.

I've also looked at many smaller regressions (around ~5% on individual files), where the common factor is that we spend a lot more time in RAGreedy (e.g. from 2% of total compile-time up to 6%). Most of the additional cost is in the calculation of region splitting costs. Something is clearly very wrong here, because a single RAGreedy::trySplit() call shouldn't take 3M instructions to execute.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D120305/new/

https://reviews.llvm.org/D120305



More information about the llvm-commits mailing list