|Backward branches firstname.lastname@example.org (2003-12-14)|
|Re: Backward branches email@example.com (2003-12-20)|
|Re: Backward branches firstname.lastname@example.org (2003-12-21)|
|Re: Backward branches email@example.com (2004-01-02)|
|Re: Backward branches firstname.lastname@example.org (2004-01-09)|
|Re: Backward branches email@example.com (Jens Troeger) (2004-01-12)|
|Re: Backward branches Robert.Thorpe@antenova.com (Robert Thorpe) (2004-01-16)|
|Date:||9 Jan 2004 23:45:13 -0500|
|Organization:||AOL Bertelsmann Online GmbH & Co. KG http://www.germany.aol.com|
|Posted-Date:||09 Jan 2004 23:45:13 EST|
firstname.lastname@example.org (kugan) schreibt:
>And also, I don't need to detect if-then-else loop, because this will
>execute only once. What I need to detect is "while loop", "for loop"
>etc. As I said earlier, I can ignore exception, as it would happen
Perhaps you should clarify some terms:
What do you mean by "detect loops using H/W"? Hardware?
Why do you consider if-then-else as loops?
Do you want to do a static or a dynamic analysis?
One of the principles of control flow analysis is the abstraction from
physical addresses, so that the arrangement of sequential code in
memory becomes unimportant. That abstraction is important for any
compiled code, since modern compilers may arrange the code in a
most-probable-next-target order, regardless of the static structure of
the source code. A loop then exists when a jump goes to a node which
has already been visited before, during the analysis of the control
flow graph. Dead code, and consequently jumps never taken, is
eliminated by control flow analysis. More code can be eliminated when
conditions can be detected as being always true/false.
In a dynamic analysis (cache implementation...) a peephole optimizer
with an LRU algorithm can be used, so that the Least Recently Used
parts of the code will remain in the cache, regardless of any jump
Return to the
Search the comp.compilers archives again.