Commit 1a220bcf authored by Sebastian Graf's avatar Sebastian Graf Committed by Marge Bot

WorkWrap: Use SysLocal Name for Thunk Splitting (#19180)

Since !4493 we annotate top-level bindings with demands, which leads to
novel opportunities for thunk splitting absent top-level thunks.

It turns out that thunk splitting wasn't quite equipped for that,
because it re-used top-level, `External` Names for local helper Ids.
That triggered a CoreLint error (#19180), reproducible with `T19180`.

Fixed by adjusting the thunk splitting code to produce `SysLocal` names
for the local bindings.

Fixes #19180.

Metric Decrease:
parent 4bb957de
Pipeline #29752 failed with stages
in 416 minutes and 31 seconds