Skip to content

[pull] main from dotnet:main#490

Merged
pull[bot] merged 1 commit intoMainbaseT:mainfrom
dotnet:main
Dec 16, 2025
Merged

[pull] main from dotnet:main#490
pull[bot] merged 1 commit intoMainbaseT:mainfrom
dotnet:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull bot commented Dec 16, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

While we have some simple heuristics on whether we should inline a
method or not, we have no limit on how many methods we can inline. So,
if a method has 1000 callsites to methods that are inlineable, we will
inline each one of them, significantly bloating the code. This is made
worse by more advanced SSA optimizations, because the compilation time
becomes very slow and uses a lot of memory.

The limit is set as a simple upper limit on the total amount of IL code
being imported as part of method compilation. This is set to a generous
initial value of 1MB, since local testing showed that it is still
handled decently well. The largest value obtained from running
System.Runtime libtests suite is 100K. A customer provided sample was
hitting 8MB of imported code, which was causing GBs of mem usage and
several seconds to compile the method. In the end, all this code was
discarded anyway, since it was exceeding interpreter offset limits, and
we had to retry compilation with inlining disabled.
@pull pull bot locked and limited conversation to collaborators Dec 16, 2025
@pull pull bot added the ⤵️ pull label Dec 16, 2025
@pull pull bot merged commit cce23ee into MainbaseT:main Dec 16, 2025
1 check failed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant