24 Commits

Author SHA1 Message Date
ALEXks
446f4d54d7 vesion updated 2026-04-10 17:29:20 +03:00
7bca67b75c new changes 2026-04-10 17:24:59 +03:00
8632dfbf31 fixes 2026-04-10 17:24:59 +03:00
97e60e16be add ddot, change array propagation 2026-04-10 17:24:59 +03:00
ALEXks
39abbafb3a fixed intent insertion 2026-04-09 15:35:28 +03:00
a1e12f5c1c Merge pull request 'egormayorov' (#78) from egormayorov into master 2026-03-27 08:29:34 +03:00
ALEXks
cad8c0913d Merge branch 'master' into egormayorov 2026-03-27 08:28:44 +03:00
ALEXks
bde804cff6 updated 2026-03-27 08:27:25 +03:00
Egor Mayorov
589680a78b fix files usage 2026-03-26 14:18:45 +03:00
ALEXks
88bac54901 fixed function prototype 2026-03-26 14:18:45 +03:00
ALEXks
0d4d2b78d8 updated 2026-03-26 14:18:45 +03:00
Egor Mayorov
bbac07202d Add swith to file usage 2026-03-26 14:18:39 +03:00
ALEXks
9325723e69 updated projects 2026-03-20 15:32:24 +03:00
ALEXks
18ac53f342 fixed inliner 2026-03-19 13:04:26 +03:00
ALEXks
0bec2c6527 assign line number to intervals for loops 2026-03-10 20:33:02 +03:00
aa56778be1 Merge pull request 'Move operators pass fixes' (#77) from egormayorov into master 2026-03-10 10:03:36 +03:00
ALEXks
0a484e77de version updated 2026-03-10 10:03:27 +03:00
Egor Mayorov
4818884d48 Remove redundant functions 2026-03-08 18:34:36 +03:00
Egor Mayorov
e172678e1b fix freezing 2026-03-08 18:28:21 +03:00
Egor Mayorov
0a977146a7 Analyze program block by block & reorder operators only in basic blocks 2026-03-05 15:55:47 +03:00
Egor Mayorov
0b50e0630a use rd 2026-03-05 15:55:47 +03:00
ALEXks
980ddeeac7 fixed build 2026-03-04 20:26:23 +03:00
788eeda22e Merge pull request 'fix search algorithm' (#76) from private_arrays2 into master 2026-03-04 20:22:08 +03:00
ALEXks
4a9cba7b96 version updated 2026-03-04 20:22:01 +03:00
10 changed files with 579 additions and 774 deletions

View File

@@ -17,7 +17,7 @@ using std::fstream;
static long int getNextTag()
{
static long int INTERVAL_TAG = 0;
return INTERVAL_TAG++;
return -(INTERVAL_TAG++);
}
//Debug funcs
@@ -413,7 +413,7 @@ static void findIntervals(SpfInterval *interval, map<int, int> &labelsRef, map<i
inter->lineFile = std::make_pair(currentSt->lineNumber(), currentSt->fileName());
inter->parent = interval;
inter->exit_levels.push_back(0);
inter->tag = getNextTag();
inter->tag = currentSt->lineNumber();//getNextTag();
interval->nested.push_back(inter);
findIntervals(inter, labelsRef, gotoStmts, currentSt);

View File

@@ -800,29 +800,58 @@ static void fillInOut(FuncInfo *currF, SgStatement *start, SgStatement *last, co
static map<string, vector<int>> supportedKeyWordArg = { {"system_clock", { OUT_BIT, OUT_BIT, OUT_BIT } } };
map<string, int> parNames;
map<string, int> parNamesMain;
map<string, int> parNamesContains;
for (int i = 0; i < currF->funcParams.identificators.size(); ++i)
parNames[currF->funcParams.identificators[i]] = i;
parNamesMain[currF->funcParams.identificators[i]] = i;
map<string, int>& parNames = parNamesMain;
bool isContainsFunctions = false;
for (auto st = start; st != last; st = st->lexNext())
{
if (st->variant() == CONTAINS_STMT)
break;
if (st->variant() == CONTAINS_STMT) {
isContainsFunctions = true;
continue;
}
if (isContainsFunctions) {
if (st->variant() == PROC_HEDR || st->variant() == FUNC_HEDR) {
parNamesContains = parNamesMain;
SgProgHedrStmt* hedr = (SgProgHedrStmt*)st;
int numOfParams = hedr->numberOfParameters();
if (numOfParams > 0)
{
for (int i = 0; i < numOfParams; ++i)
{
auto it = parNamesContains.find(hedr->parameter(i)->identifier());
if (it != parNamesContains.end())
parNamesContains.erase(it);
}
}
parNames = parNamesContains;
}
}
if (st->variant() == ENTRY_STAT)
continue;
if (isSgExecutableStatement(st) == NULL) {
checkInTypeDescription(st->expr(0), currF, parNames);
if (!isContainsFunctions)
checkInTypeDescription(st->expr(0), currF, parNames);
continue;
}
if (st->lineNumber() <= 0)
continue;
if (activeOps.size() && activeOps.find(st) == activeOps.end())
continue;
//XXX: use parameters removing in block ... isContainsFunctions ...
//TODO need to use IR for parameters checking
/*if (activeOps.size() && activeOps.find(st) == activeOps.end())
continue; */
if (st->variant() == ASSIGN_STAT)
{

View File

@@ -9,8 +9,6 @@
#include "range_structures.h"
#include "region.h"
#include "..\Transformations\ExpressionSubstitution\expr_transform.h"
#include "SgUtils.h"
using namespace std;

View File

@@ -1,4 +1,4 @@
#include "Utils/leak_detector.h"
#include "Utils/leak_detector.h"
#pragma comment(linker, "/STACK:536870912") // 512 МБ
@@ -943,7 +943,7 @@ static bool runAnalysis(SgProject &project, const int curr_regime, const bool ne
}
}
else if (curr_regime == MOVE_OPERATORS)
moveOperators(file, loopGraph, fullIR, countOfTransform);
moveOperators(file, fullIR, countOfTransform);
else if (curr_regime == PRIVATE_REMOVING_ANALYSIS)
{
auto itFound = loopGraph.find(file->filename());

View File

@@ -1089,6 +1089,8 @@ static int clean(const string& funcName, SgStatement* funcSt, const map<string,
}
SgGotoStmt* gotoSt = new SgGotoStmt(*contLab);
if (st->label())
gotoSt->setLabel(*st->label());
st->insertStmtBefore(*gotoSt, *st->controlParent());
toDelete.push_back(st);

File diff suppressed because it is too large Load Diff

View File

@@ -3,4 +3,4 @@
#include "../../GraphLoop/graph_loops.h"
#include "../../CFGraph/CFGraph.h"
void moveOperators(SgFile *file, std::map<std::string, std::vector<LoopGraph*>>& loopGraph, const std::map<FuncInfo*, std::vector<SAPFOR::BasicBlock*>>& FullIR, int& countOfTransform);
void moveOperators(SgFile* file, const std::map<FuncInfo*, std::vector<SAPFOR::BasicBlock*>>& FullIR, int& countOfTransform);

View File

@@ -1,3 +1,3 @@
#pragma once
#define VERSION_SPF "2467"
#define VERSION_SPF "2474"