dubiousconst282 / DistIL

Post-build IL optimizer and intermediate representation for .NET programs
MIT License
117 stars 2 forks source link

Implement method inlining heuristics #3

Closed dubiousconst282 closed 8 months ago

dubiousconst282 commented 2 years ago

We have no heuristic for inlining at the moment; all methods with less than 8 blocks are inlined, that's obviously not great for real world scenarios.

We also need to be careful in some cases:

Other ideas

Since we can inline lambdas that have a known callsite within the same method, we may benefit by some special cases: