Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JIT: Promote size-wise improvements in physical promotion (#92717)
I hit the following case: ``` Evaluating access byref @000 Single write-back cost: 3 Write backs: 0 Read backs: 0 Estimated cycle improvement: 0 cycles per invocation Estimated size improvement: 2 bytes Disqualifying replacement ``` These cases happen when the blocks that have candidates for promotion in them have bbWeight equal to 0. If we estimate a size improvement without a cycle improvement it still makes sense to promote a replacement. More generally, a large size improvement can make up for a small cycle regression, so add a heuristic similar to the existing one for this. I've set it to be quite conservative: we require 100 bytes of size improvement before we allow 1 cycle of regression. This is enough to handle the common case where the cycle improvement is 0 due to the bbWeight = 0.
- Loading branch information