JIT: Add a size component to the physical promotion heuristic#87969
JIT: Add a size component to the physical promotion heuristic#87969jakobbotsch merged 2 commits intodotnet:mainfrom
Conversation
The physical promotion heuristic was basing all decisions on an estimate of execution cost. One problematic thing is that that estimate is scaled by block weights. This does not allow us to take into account that blocks that are never executed still has some cost associated with increased code size. This changes the accounting pass to track unweighted counts and uses the unweighted counts as part of the heuristic. The new heuristic check is then that we improve the execution cost, but also that we only allow up to some amount of size regression depending on how many cycles we estimate to gain.
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch Issue DetailsThe physical promotion heuristic was basing all decisions on an estimate of execution cost. One problematic thing is that that estimate is scaled by block weights. This does not allow us to take into account that blocks that are never executed still has some cost associated with increased code size. This changes the accounting pass to track unweighted counts and uses the unweighted counts as part of the heuristic. The new heuristic check is then that we improve the execution cost, but also that we only allow up to some amount of size regression depending on how many cycles we estimate to gain.
|
|
cc @dotnet/jit-contrib PTAL @AndyAyersMS |
The physical promotion heuristic was basing all decisions on an estimate of execution cost. One problematic thing is that that estimate is scaled by block weights. This does not allow us to take into account that blocks that are never executed still has some cost associated with increased code size.
This changes the accounting pass to track unweighted counts and uses the unweighted counts as part of the heuristic. The new heuristic check is then that we improve the execution cost, but also that we only allow up to some amount of size regression depending on how many cycles we estimate to gain.