mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
7db2c64f61
Remove the logic for detecting Instructions with duplicated uses introduced by control-flow restructuring (the use is duplicated, but the instruction is not). By dropping this detection, we'll end up not marking for serialization some Instructions. Hence, when emitting C code, such Instructions will just be emitted as inline expressions, without declaring a dedicated local variable to hold their value. This is somehow suboptimal w.r.t the fact that the expression will be emitted many times, one for each duplicated use. However, this is not semantically incorrect, just verbose. On the other hand, the logic for detecting Instructions with duplicated uses has always been subtly broken, because it only looked at the number of duplicates for a given basic block introduced by control-flow restructuring. This information is not enough to detect Instructions with duplicated uses. Proper detection should actually be based on GHAST.