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

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Feb 25 01:05:39 PST 2022


MaskRay added a comment.

In D120305#3344938 <https://reviews.llvm.org/D120305#3344938>, @nikic wrote:

> Hm, it looks like enabling PIE has a pretty big negative compile-time impact, with a 20% regression on sqlite3: http://llvm-compile-time-tracker.com/compare.php?from=611122892e6d5813444bdd0e1fbe0a96f6e09779&to=3c4ed02698afec021c6bca80740d1e58e3ee019e&stat=instructions Code-size on kimwitu++ regresses by 13%.
>
> Is that kind of impact expected?

It's not expected on aarch64/x86-64. Some architectures not supporting PC-relative relocations (i386/ppc32) may suffer and that's expected.

We need to investigate the -fno-pic vs -fpie difference.
Many groups already use PIE and the investigation will be useful.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D120305



More information about the cfe-commits mailing list