mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
be72da8b48
We now reduce the number of cases in which we restart the collection of the `DivergenceDescriptor`s after a IDS modification on the `ScopeGraph` is performed. We previously restarted the collection after each IDS transformation. Now, restart is only performed after IDS is applied on a `Conditional` node whose all successors are divergent exits which are `goto` exits. After such `Conditional` is processed, it may happen that a new `goto` exit becomes divergent for another `Conditional` upwards in the `ScopeGraph`. Therefore, if we do not restart, it may happen that a non-`goto` exit is processed before a `goto` exit, which may lead to suboptimal situations in the emitted number of `goto`s, due to how IDS interacts with `MaterializeTrivialGotos`.