[PATCH] D156491: [RA] Split a virtual register in cold blocks if it is not assigned preferred physical register
Hans Wennborg via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 4 03:54:12 PDT 2023
hans added a comment.
In D156491#4652685 <https://reviews.llvm.org/D156491#4652685>, @Carrot wrote:
> In D156491#4652598 <https://reviews.llvm.org/D156491#4652598>, @hans wrote:
>
>> We're seeing binary size increases in Chromium, in particular for Android and Fuchsia where size is critical: https://crbug.com/1488374
>> Is that an inherent property of this change, and could it be scaled back for optsize functions for example?
>
> This change is driven by the cost of using a single physical register and split a register. As most cost computations in RA, these are based on the weighted number of instructions (dynamic number of instructions or performance), static number of instructions is not considered. So its impact to code size is random. You can use -split-threshold-for-reg-with-hint=0 to disable this optimization.
It does consistently increase binary size (where we measured, which is Android and Fuchsia), so I wouldn't call it random. We are using `-split-threshold-for-reg-with-hint=0` to disable this for now, but we really don't want to use internal compiler flags, and I don't think we can expect users to do so in general.
Did you look at binary size in your benchmarking? If we can't make it size neutral, I think we should consider turning it off in `optsize` functions.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156491/new/
https://reviews.llvm.org/D156491
More information about the llvm-commits
mailing list