Commit 5e72af13 authored by Anirudh's avatar Anirudh
Browse files

Improvements

parent 0560fb47
......@@ -4,7 +4,7 @@ using namespace scpar;
SusCFG::SusCFG(CFGBlock * block):_block(block),
_parentCFGBlock(NULL),
_parentSusCFGBlock(NULL), _isWaitBlock(false), _isParentBlock(false)
_parentSusCFGBlock(NULL), _isWaitBlock(false), _isParentBlock(false), _isGPUFit(false)
{
}
......@@ -33,6 +33,16 @@ void SusCFG::addSuccBlocks(SusCFG * block)
_succBlocks.push_back(block);
}
void SusCFG::addGPUFit()
{
_isGPUFit = true;
}
void SusCFG::denyGPUFit()
{
_isGPUFit = false;
}
void SusCFG::addChildBlockList(SusCFG * block)
{
_childBlockList.push_back(block);
......@@ -90,6 +100,11 @@ bool SusCFG::isParentBlock()
return _isParentBlock;
}
bool SusCFG::isGPUFit()
{
return _isGPUFit;
}
unsigned int SusCFG::getParentBlockID()
{
if (_parentCFGBlock) {
......
......@@ -29,10 +29,13 @@ namespace scpar {
void setParentBlock();
void addChildBlockList(SusCFG *);
void addChildBlockList(vector < SusCFG * >);
void addGPUFit();
void denyGPUFit();
bool isWaitBlock();
bool isParentBlock();
bool isParentWaitBlock();
bool isGPUFit();
unsigned int getBlockID();
unsigned int getParentBlockID();
......@@ -49,9 +52,11 @@ namespace scpar {
SusCFG *_parentSusCFGBlock;
vector < SusCFG * >_predBlocks;
vector < SusCFG * >_succBlocks;
bool _isWaitBlock;
// need to add a isTranslateCUDA field here
bool _isWaitBlock;
bool _isParentBlock;
Stmt *_waitStmt;
bool _isGPUFit;
Stmt *_waitStmt;
vector < SusCFG * >_childBlockList;
};
////////////////////////////////////////////////////////////////////////////////////////
......
......@@ -84,9 +84,9 @@ bool SystemCConsumer::fire()
SuspensionAutomata suspensionAutomata(findWaits.getWaitCalls(), ef->getEntryMethod(), &_context, llvm::errs());
if (suspensionAutomata.initialize()) {
suspensionAutomata.genSusCFG();
suspensionAutomata.dumpSusCFG();
//suspensionAutomata.dumpSusCFG();
suspensionAutomata.genSauto();
suspensionAutomata.dumpSauto();
//suspensionAutomata.dumpSauto();
ef->addSusCFGAuto(suspensionAutomata);
}
......
......@@ -34,10 +34,10 @@ public:
model->dump(llvm::errs());
GlobalSuspensionAutomata gsauto(model, _os, &_context);
gsauto.initialise();
gsauto.initialise();
gsauto.genGSauto();
gsauto.dump();
gsauto.initializeGpuMap();
gsauto.dump();
return true;
}
};
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment