You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
--opt-report: a function whose call sites were all inlined away never enters the spec-ABI decision loop, so the report cannot say "moot" #7111
--opt-report cannot say anything about a function whose call sites were all
removed by an earlier pass. It does not report "moot"; it reports nothing, which
is indistinguishable from "not analysed" and from "analysed and denied".
Mechanism
crates/perry-codegen/src/codegen/mod.rs:2221:
for f in&hir.functions{letSome(sites) = spec_facts.call_sites.get(&f.id)else{continue;};
spec_facts.call_sites is built in crates/perry-codegen/src/collectors/spec_abi_sites.rs:669 by walking hir.init
and every function body for direct Call expressions. A function whose calls
were inlined (perry-transform's inliner, crates/perry/src/commands/compile/collect_modules.rs:1923)
and then constant-folded by unroll_static_loops (:1946) has no Call left,
so it has no call_sites entry and the loop continues — before any TypedCloneRejectionReason is constructed. Nothing reaches record_typed_clone_rejection, so nothing reaches opt_report::deny_named.
--opt-report=json --no-link: zero entries. Grow compute's body past MAX_INLINE_STMTS (10, crates/perry-transform/src/inline/mod.rs:59) and the
same program reports one spec-abi entry.
Ruled out: this is not the should_record_typed_clone_rejection filter at codegen/mod.rs:106-119. Re-running with PERRY_NATIVE_REPS_ALL_TYPED_CLONE_REJECTIONS=1, which opens that filter,
produces the identical empty "entries": []. No rejection reason is ever built.
benchmarks/suite/14_closure.ts is the census workload affected.
Why it matters
This is the difference between an instrument that is silent because there was
nothing to say and one that is silent because it never ran — the distinction #7106 exists to make. Here the right answer is genuinely "moot: no call site
survives, so there is no ABI to specialize", and the report should be able to
say so rather than leaving a reader to infer it.
Ask
Record an entry (an Outcome/tier meaning "not applicable", or a denial with a
rule like no_surviving_call_site) for a function that reaches the decision
loop with no call sites. Cheap: one else arm at codegen/mod.rs:2221.
Related, smaller: the six TypedCloneRejectionReason variants suppressed by should_record_typed_clone_rejection (NotClosure, ReturnTypeNotF64, ReturnTypeNotI32, ReturnTypeNotI1, ReturnTypeNotString, NoReceiverField) belong to the older per-type clone mechanism, which spec_abi_entry_decision never emits — so that filter is not currently
hiding spec-ABI decisions. Noted here so the next reader does not re-derive it.
Verified fixed on current origin/main at ed97b9c by merged PR #7818 (merge commit e2aae0b). The spec-ABI decision loop now records SpecNoCallSites/spec_no_call_sites when earlier passes remove every call, and the merged regression fixture exercises the inlined-and-folded case. Closing as fixed by #7818.
Activity
test(repsel): make "no analysis ran" a visible, gated state
test(repsel): make "no analysis ran" a visible, gated state (#7113)
fix(opt-report): report spec_no_call_sites instead of silence when ev…
fix(opt-report): report spec_no_call_sites instead of silence when ev…
proggeramlug commentedon Aug 11, 2026
Verified fixed on current origin/main at ed97b9c by merged PR #7818 (merge commit e2aae0b). The spec-ABI decision loop now records SpecNoCallSites/spec_no_call_sites when earlier passes remove every call, and the merged regression fixture exercises the inlined-and-folded case. Closing as fixed by #7818.