Added supports for COMSAT
This commit is contained in:
parent
399b54f35c
commit
05efbec326
File diff suppressed because it is too large
Load Diff
|
@ -152,6 +152,10 @@ std::string NODE::get_Name()
|
|||
return name;
|
||||
}
|
||||
|
||||
void NODE::set_Name(std::string new_name){
|
||||
name = new_name;
|
||||
}
|
||||
|
||||
Value* NODE::get_LLVM_Instruction()
|
||||
{
|
||||
return Node_Ins;
|
||||
|
@ -447,6 +451,14 @@ NODE* DFG::get_Node(int number)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
NODE* DFG::get_Node(std::string name){
|
||||
std::vector<NODE*>::iterator iNode1;
|
||||
for (iNode1 = _node_Set.begin(); iNode1 != _node_Set.end(); iNode1++)
|
||||
if((*iNode1)->get_Name().compare(name) == 0)
|
||||
return (*iNode1);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
NODE* DFG::get_Node(Value* ins)
|
||||
{
|
||||
std::vector<NODE*>::iterator iNode1;
|
||||
|
@ -636,6 +648,10 @@ std::vector<ARC*> DFG::getSetOfArcs()
|
|||
return _ARC_Set;
|
||||
}
|
||||
|
||||
std::vector<NODE*> DFG::getSetOfVertices(){
|
||||
return _node_Set;
|
||||
}
|
||||
|
||||
void DFG::Dot_Print_DFG(std::string filename)
|
||||
{
|
||||
std::ofstream dotFile;
|
||||
|
@ -705,6 +721,9 @@ void DFG::Dot_Print_DFG(std::string filename)
|
|||
alignment = _ARC_Set[i]->get_To_Node()->getAlignment();
|
||||
dotFile << _ARC_Set[i]->get_From_Node()->get_ID() << " -> " << _ARC_Set[i]->get_To_Node()->get_ID() << " [color=orange, label=" << alignment << "] \n";
|
||||
}
|
||||
else if(_ARC_Set[i]->Get_Dependency_Type() == LoopControlDep){
|
||||
dotFile << _ARC_Set[i]->get_From_Node()->get_ID() << " -> " << _ARC_Set[i]->get_To_Node()->get_ID() << " [color=blueviolet]\n";
|
||||
}
|
||||
else if(_ARC_Set[i]->get_From_Node()->get_Instruction() == constant)
|
||||
{
|
||||
dotFile << _ARC_Set[i]->get_From_Node()->get_ID() << " -> " << _ARC_Set[i]->get_To_Node()->get_ID() << " [color=gray]\n";
|
||||
|
@ -794,7 +813,7 @@ void DFG::Dump_Loop(std::string filename)
|
|||
if((_node_Set[i]->get_Instruction() == constant) && (_node_Set[i]->get_Number_of_Pred() > 0) && (_node_Set[i]->get_Number_of_Succ() <= 0))
|
||||
continue;
|
||||
|
||||
if((_node_Set[i]->get_Instruction() == cgra_select) && (_node_Set[i]->get_Number_of_Pred() > 2))
|
||||
if((_node_Set[i]->get_Instruction() == cgra_select) && (_node_Set[i]->get_Number_of_Pred() > 3))
|
||||
{
|
||||
if(debug) errs() << "nodefile node: " << _node_Set[i]->get_ID() << "\tpred:" << _node_Set[i]->get_Number_of_Pred() << "\n";
|
||||
nodeFile << _node_Set[i]->get_ID() << "\t" << cond_select << "\t" << _node_Set[i]->get_Name() << "\t" << alignment << "\t" << _node_Set[i]->getDatatype() << "\n";
|
||||
|
@ -822,6 +841,8 @@ void DFG::Dump_Loop(std::string filename)
|
|||
{
|
||||
edgeFile << _ARC_Set[i]->get_From_Node()->get_ID() << "\t" << _ARC_Set[i]->get_To_Node()->get_ID() << "\t" << _ARC_Set[i]->Get_Inter_Iteration_Distance() << "\t" << "LIE"<<"\t" <<_ARC_Set[i]->GetOperandOrder() << "\n";
|
||||
}
|
||||
else if(_ARC_Set[i]->Get_Dependency_Type() == LoopControlDep)
|
||||
edgeFile << _ARC_Set[i]->get_From_Node()->get_ID() << "\t" << _ARC_Set[i]->get_To_Node()->get_ID() << "\t" << _ARC_Set[i]->Get_Inter_Iteration_Distance() << "\t" << "LCE"<<"\t" <<_ARC_Set[i]->GetOperandOrder() << "\n";
|
||||
else
|
||||
{
|
||||
edgeFile << _ARC_Set[i]->get_From_Node()->get_ID() << "\t" << _ARC_Set[i]->get_To_Node()->get_ID() << "\t" << _ARC_Set[i]->Get_Inter_Iteration_Distance() << "\t" << "TRU"<<"\t"<< _ARC_Set[i]->GetOperandOrder() << "\n";
|
||||
|
|
|
@ -35,7 +35,8 @@ namespace llvm
|
|||
BranchDep,
|
||||
PredDep,
|
||||
LiveInDataDep,
|
||||
LiveOutDataDep
|
||||
LiveOutDataDep,
|
||||
LoopControlDep
|
||||
};
|
||||
|
||||
enum Instruction_Operation
|
||||
|
@ -86,9 +87,13 @@ namespace llvm
|
|||
int16, //2
|
||||
float32, //3
|
||||
float64, //4
|
||||
float16 //5
|
||||
float16, //5
|
||||
_struct, //6
|
||||
_array
|
||||
};
|
||||
|
||||
const unsigned DT_Size[6] = {1,4,2,4,8,2};
|
||||
|
||||
class NODE
|
||||
{
|
||||
|
||||
|
@ -125,6 +130,7 @@ namespace llvm
|
|||
int get_ID();
|
||||
int get_Latency();
|
||||
std::string get_Name();
|
||||
void set_Name(std::string);
|
||||
Value* get_LLVM_Instruction();
|
||||
void set_Latency(int laten);
|
||||
Instruction_Operation get_Instruction();
|
||||
|
@ -250,10 +256,13 @@ namespace llvm
|
|||
//return a node with given ID number
|
||||
NODE* get_Node(int number);
|
||||
|
||||
//return a node in the DFG with a given name
|
||||
NODE* get_Node(std::string name);
|
||||
|
||||
//return true if DFG contains a node with given name
|
||||
NODE* get_Node(Value* ins);
|
||||
|
||||
NODE* get_Node_1(Value* ins);
|
||||
NODE* get_Node_1(Value* ins);
|
||||
|
||||
NODE* get_Node_Mem_Add(Value* ins);
|
||||
NODE* get_Node_Mem_Data(Value* ins);
|
||||
|
|
Loading…
Reference in New Issue