runtime: RyuJIT: Volatile param shouldn't prevent inlining

[FAILED: argument has side effect] Math:Min(int,int):int

Math:Min(int,int):int doesn’t appear to have any side effect?

Related issue: https://github.com/dotnet/corefx/issues/11441 "ConcurrentQueue has Math.Min non-inlines "

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 15 (15 by maintainers)

Commits related to this issue

Most upvoted comments

I tracked down the implementations of impInlineSpillLclRefs and impInlineSpillGlobEffects. It turns out the inliner used to have its own import loop, which didn’t handle as many cases, and for which those methods were trimmed-down versions of impSpillLclRefs and impSpillSideEffects. Now that the inliner shares the main import loop with the importer, it’s using the full versions of those helpers which have impSpillSpecialSideEff calls as needed to handle the GTF_ORDER_SIDEFF cases.

Meanwhile, it looks like everything the inliner does for argHasSideEff args is something it needs to do for volatiles, and AFAIK is sufficient for them, so I’ll try testing the change to set it for GTF_ORDER_SIDEEFF arguments.