Skip to content

Commit

Permalink
Add patchAPI/src/PatchLoop.C
Browse files Browse the repository at this point in the history
  • Loading branch information
hainest committed Apr 3, 2024
1 parent d4f3857 commit 266077d
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions patchAPI/src/PatchLoop.C
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
using namespace std;
using namespace Dyninst;
using namespace Dyninst::PatchAPI;
//constructors
//internal use only


PatchLoop::PatchLoop(PatchObject *obj, ParseAPI::Loop *loop): loop_(loop), parent(NULL) {
//parent pointer and containedLoops vectors are set in PatchFunction::createLoops
Expand Down Expand Up @@ -129,29 +126,22 @@ bool PatchLoop::getLoops(vector<PatchLoop*>& nls, bool outerMostOnly) const
return true;
}

//method that returns the nested loops inside the loop. It returns a set
//of Loop that are contained. It might be useful to add nest
//as a field of this class but it seems it is not necessary at this point
bool PatchLoop::getContainedLoops(vector<PatchLoop*>& nls)
{
return getLoops(nls, false);
}

// get the outermost loops nested under this loop
bool
PatchLoop::getOuterLoops(vector<PatchLoop*>& nls)
{
return getLoops(nls, true);
}

//returns the basic blocks in the loop
bool PatchLoop::getLoopBasicBlocks(vector<PatchBlock*>& bbs) {
bbs.insert(bbs.end(), basicBlocks.begin(), basicBlocks.end());
return true;
}


// returns the basic blocks in this loop, not those of its inner loops
bool PatchLoop::getLoopBasicBlocksExclusive(vector<PatchBlock*>& bbs) {
// start with a copy of all this loops basic blocks
std::set<PatchBlock*> allBlocks(basicBlocks);
Expand Down

0 comments on commit 266077d

Please sign in to comment.