Files
SAPFOR/Sapfor/_src/DynamicAnalysis/createParallelRegions.h

34 lines
849 B
C
Raw Normal View History

2023-09-14 19:43:13 +03:00
#pragma once
#include "../Utils/utils.h"
#include "./gcov_info.h"
#include "../CreateInterTree/CreateInterTree.h"
#include "../GraphCall/graph_calls.h"
#include <map>
#include <vector>
struct SpfRegion
{
int id;
double time;
SgStatement *start;
SgStatement *end;
SpfRegion(int id_, int time_, SgStatement *start_, SgStatement *end_) :
id(id_), time(time_), start(start_), end(end_) {}
SpfRegion& operator+=(const SpfRegion &rg)
{
if (this != &rg)
{
end = rg.end;
time += rg.time;
}
return *this;
}
};
void createParallelRegions(SgProject *project, SpfInterval *mainInterval, const std::map<std::string, std::map<int, Gcov_info>> &gCovInfo, const std::map<std::string, std::vector<FuncInfo*>> &funcInfo);