fix range stuctures #60

Merged
Alexander_KS merged 1 commits from private_arrays_fix into master 2025-06-02 05:26:21 +00:00
2 changed files with 8 additions and 2 deletions

View File

@@ -184,7 +184,8 @@ void AccessingSet::FindUncovered(const vector<ArrayDimension>& element, vector<v
newTails.insert(newTails.end(), diff.begin(), diff.end()); newTails.insert(newTails.end(), diff.begin(), diff.end());
} }
} }
result = move(newTails); result = newTails;
newTails.clear();
} }
} }

View File

@@ -139,6 +139,9 @@ static int GetDefUseArray(SAPFOR::BasicBlock* block, LoopGraph* loop, ArrayAcces
} }
if(coefsForDims.empty())
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
while (!index_vars.empty()) while (!index_vars.empty())
{ {
auto var = index_vars.back(); auto var = index_vars.back();
@@ -214,7 +217,10 @@ static Region* CreateSubRegion(LoopGraph* loop, const vector<SAPFOR::BasicBlock*
if (bbToRegion.find(header) != bbToRegion.end()) if (bbToRegion.find(header) != bbToRegion.end())
region->setHeader(bbToRegion.at(header)); region->setHeader(bbToRegion.at(header));
else else
{
printInternalError(convertFileName(__FILE__).c_str(), __LINE__);
return NULL; return NULL;
}
for (SAPFOR::BasicBlock* block : blockSet) for (SAPFOR::BasicBlock* block : blockSet)
if (bbToRegion.find(block) != bbToRegion.end()) if (bbToRegion.find(block) != bbToRegion.end())
@@ -223,7 +229,6 @@ static Region* CreateSubRegion(LoopGraph* loop, const vector<SAPFOR::BasicBlock*
for (LoopGraph* childLoop : loop->children) for (LoopGraph* childLoop : loop->children)
region->addSubRegions(CreateSubRegion(childLoop, Blocks, bbToRegion)); region->addSubRegions(CreateSubRegion(childLoop, Blocks, bbToRegion));
cout << header << endl;
return region; return region;
} }