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
Make serialising Yk IR instructions more flexible.
Initially, each LLVM IR instruction had to be lowered to exactly
one Yk IR instruction. Why? Because it was easy to implement.
Later we realised we needed to skip certain LLVM instructions (e.g.
debug calls).
At this point we added complexity. Due to the way the deserialiser
works, we need to emit an instruction count field before emitting the
instructions themselves. Therefore we had to first count how many
instructions would be emitted in an initial loop, emit this count, then
emit the instructions themselves in a second loop.
This change removes the need for the first loop by "patching up" a
placeholder instruction count field once the number of instructions is
known.
In turn this simplifies the code quite a bit, making it easier to
maintain, but also will make it easier for one LLVM instruction to be
lowered to more than one Yk IR instruction. For example, we might opt to
lower an LLVM switch instruction into a series of Yk IR conditional
instructions.
No functional change. No runtime changes required.
0 commit comments