Skip to content

Commit

Permalink
Add parseAPI/LoopAnalyzer.h
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent 8db2b8f commit 10e617c
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 10 deletions.
19 changes: 17 additions & 2 deletions docs/parseAPI/developer/LoopAnalyzer.h.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,20 @@
.. _`sec:LoopAnalyzer.h`:

LoopAnalyzer.h
==============
##############

.. cpp:namespace:: Dyninst::ParseAPI

.. cpp:class:: LoopAnalyzer

**Finds loops in a function**

| Implement WMZC algorithm to detect both natural loops and irreducible loops
| "A New Algorithm for Identifying Loops in Decompilation" by Tao Wei, Jian Mao, Wei Zou and Yu Chen
.. cpp:function:: bool analyzeLoops()
.. cpp:function:: void createLoopHierarchy()

.. cpp:namespace:: Dyninst::parseAPI
Creates the tree of loops/callees for this flow graph.

.. cpp:function:: LoopAnalyzer (const Function *f)
9 changes: 1 addition & 8 deletions parseAPI/src/LoopAnalyzer.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,9 @@

using namespace std;

/** class which finds loops in a function
*
*/
namespace Dyninst {
namespace ParseAPI {

// Implement WMZC algorithm to detect both natural loops
// and irreducible loops
// Reference: "A New Algorithm for Identifying Loops in Decompilation"
// by Tao Wei, Jian Mao, Wei Zou and Yu Chen
class LoopAnalyzer {


Expand All @@ -69,7 +62,7 @@ class LoopAnalyzer {

public:
bool analyzeLoops();
/** create the tree of loops/callees for this flow graph */

void createLoopHierarchy();

LoopAnalyzer (const Function *f);
Expand Down

0 comments on commit 10e617c

Please sign in to comment.