tobogganSe connecter

louise

The Louise language: compiler, runtime, std, tooling

Clone avec HTTPS, un jeton personnel en mot de passe, ou avec SSH, une clé ajoutée dans vos paramètres.

Core: inline a function called exactly once, as a move (issue #196)

A direct call that is the callee's one call site moves the body instead
of copying it, as a closure used once already did; a body ending in a
switch is wrapped in a block at a non-tail site (capped at 512 nodes).
A caller the body was moved into can die when its own call is inlined
away: the move is tracked per target, and a target with no live caller
left leaves no copy, so the body may move again. This dissolves the
step function of a fused list pipeline into its counting loop.

The CPR test's splitmix is called twice now: with one call site it is
inlined before CPR runs and no worker is made.

olivier · il y a 1 mois · 0b0d58e81c8f4bb999f2ce9c9a246d95a70e8d48

Parents 7c917ba

6 fichiers modifiés, 246 ajouts, 6 suppressions

Mcrates/louise_core/src/opt/simplify.rs+101−2
Mcrates/louise_core/tests/simplify.rs+38−0
Mcrates/louise_core/tests/snapshots/cpr__a_tuple_returning_function_gets_a_worker.snap+7−3
Acrates/louise_core/tests/snapshots/simplify__a_function_called_twice_stays_a_call.snap+63−0
Acrates/louise_core/tests/snapshots/simplify__inlines_a_function_called_once_ending_in_a_switch.snap+33−0