[PATCH] D156491: [RA] Split a virtual register in cold blocks if it is not assigned preferred physical register

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 3 08:32:38 PDT 2023


Carrot added a comment.

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.


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