JIT: Make LACKS_RETURN callsite-specific - #134198
AndyAyersMS wants to merge 1 commit into
Conversation
The inliner records LACKS_RETURN when no suitable return expression is found while importing an inlinee. Since importation is specialized for the call site, this observation should be scoped to CALLSITE rather than CALLEE. Callees with no return blocks are already handled by CALLEE_DOES_NOT_RETURN. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> Copilot-Session: 0793cca8-3c8d-4f6e-9d2f-a52fe39c0784
|
Azure Pipelines: Successfully started running 5 pipeline(s). 11 pipeline(s) were filtered out due to trigger conditions. There may be pipelines that require an authorized user to comment /azp run to run. |
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
|
A small tweak to a rarely-made observation. CALLEE noinline observations are usually propagated back to the runtime to inhibit future inline attempts, CALLSITE observations just fail the current attempt. This observation is contextual (can depend on call site), so classify it that way. @EgorBo PTAL |
There was a problem hiding this comment.
🟢 Approval recommended
The change is localized, references were updated consistently (no remaining CALLEE_LACKS_RETURN usages), and the new target aligns with how LegalPolicy treats CALLSITE vs CALLEE fatal observations.
Pull request overview
Updates the JIT inlining observation for “missing return expression” to be callsite-scoped rather than callee-scoped, so a failure to materialize a return value during a particular inline attempt doesn’t permanently mark the callee as never-inline.
Changes:
- Reclassify
LACKS_RETURNfromCALLEEtoCALLSITEand adjust its diagnostic text. - Update the inliner failure path to report
CALLSITE_LACKS_RETURNinstead ofCALLEE_LACKS_RETURN.
File summaries
| File | Description |
|---|---|
| src/coreclr/jit/inline.def | Changes LACKS_RETURN to be a callsite-targeted fatal observation with updated wording. |
| src/coreclr/jit/fginline.cpp | Updates the inline failure recording to use InlineObservation::CALLSITE_LACKS_RETURN. |
Review details
- Files reviewed: 2/2 changed files
- Comments generated: 0
- Review effort level: Lite
Summary
The inliner records
LACKS_RETURNwhen contextual import finds no suitablereturn expression. Since this can depend on call-site specialization, classify
the observation as
CALLSITEso one failed attempt does not permanently markthe callee as uninlineable.
Callees with no return blocks are already handled by
CALLEE_DOES_NOT_RETURN.Testing
build.cmd clr+libs -c Checkedbuild.cmd clr.jit -c CheckedNote
This pull request description was generated with GitHub Copilot.