[PATCH] D130531: [IR] Use Min behavior for module flag "PIC Level"
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 12 14:39:55 PDT 2023
MaskRay added a comment.
In D130531#4644687 <https://reviews.llvm.org/D130531#4644687>, @aeubanks wrote:
> I'm not understanding why this doesn't also apply to "PIE Level", doesn't it also follow the same reasoning? pic -> PIC is the same as pie -> PIE
>
> e.g. if you merge a small PIC and large PIC file, the resulting file would only be guaranteed to work with a "large PIC executable" (unsure what the right term is) and not a "small PIC executable", so if we say it's a large PIC file, that's wrong since it wouldn't link into a "large PIC executable", so we have to conservatively say it's a small PIC file.
> and s/PIC/PIE for the same argument
"PIE Level" is a bit of a misdesign. We should treat the value as a boolean and ignore 1/2 difference.
"PIC Level" decides the small PIC vs large PIC difference, as well as the small PIE vs large PIE difference.
I think "PIE Level" should use "Min" as well.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D130531/new/
https://reviews.llvm.org/D130531
More information about the cfe-commits
mailing list