dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.12k stars 4.7k forks source link

JIT: Reconsider block weight propagation in loop cloning #103001

Open amanasifkhalid opened 4 months ago

amanasifkhalid commented 4 months ago

Part of #93020. As mentioned in #102897, the logic in Compiler::optCloneLoops for propagating block weights is probably wrong when we have weights derived from PGO data -- in particular, we shouldn't need to scale weights based on the loop's depth. Doing so likely breaks block weight consistency (which we aren't checking just yet this late in the JIT's phases, hence the lack of assert failures).

dotnet-policy-service[bot] commented 4 months ago

Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch See info in area-owners.md if you want to be subscribed.

JulieLeeMSFT commented 4 months ago

cc @AndyAyersMS.