Skip to content

Issue82 inf loop in peephole

Yi Lin requested to merge issue82-inf-loop-in-peephole into develop

Our peephole optimisation will remove jump-to-jump cases.

However, for cases such as

  jmp L2
  jmp L3
  jmp L1

the peephole optimiser will get into an infinite loop as we cannot find the final destination to jump. We need to be able to detect this infinite loop so the compiler won't get into an infinite loop. We do not apply optimisations (it is a busy infinite loop that does nothing, which is meaningless anyway).

Merge request reports