[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

loop identification



Hello,

I am interested in identification of loops in the Jimple. I have found out that it has a simple pattern you use to create an iterative behaviour. the pattern look more or less like:

label0:
  do sth;
  ...

label1:                         // begin nested loop
  do sth else;
  ...

label2:
  $z0 = ...;
  if $z0 != 0 goto label1;      // end nested loop

...

label3:
  $z1 = ...;
  if $z1 != 0 goto label0;

...

This looks quite convenient. My question is if i do not miss something, some other situations which can occur?

Is it possible to have, for example, two different places with the conditional branch to the same label or it is always only one for sure?

or:

Is there more convenient way to identify loops?

Thanks a lot.

Best regards,

Richard