|
OpenASIP 2.2
|
#include <DataDependenceEdge.hh>


Public Types | |
| enum | DependenceType { DEP_UNKNOWN = 0 , DEP_RAW = 1 , DEP_WAR = 2 , DEP_WAW = 3 , DEP_TRIGGER = 4 } |
| enum | EdgeReason { EDGE_REGISTER , EDGE_MEMORY , EDGE_FUSTATE , EDGE_OPERATION , EDGE_RA } |
Public Member Functions | |
| DataDependenceEdge (EdgeReason edgereason, DependenceType deptype, TCEString data, bool guard=false, bool certainAlias=false, bool tailPseudo=false, bool headPseudo=false, int loop=0) | |
| DataDependenceEdge (EdgeReason edgereason, DependenceType deptype, bool guard=false, bool certainAlias=false, bool tailPseudo=false, bool headPseudo=false, int loop=0) | |
| DataDependenceEdge (const DataDependenceEdge &other) | |
| DataDependenceEdge (const DataDependenceEdge &other, bool invertLoop) | |
| virtual | ~DataDependenceEdge () |
| TCEString | toString () const |
| TCEString | toString (MoveNode &tail) const |
| ObjectState * | saveState (const MoveNode &tail, const MoveNode &head) |
| DependenceType | dependenceType () const |
| EdgeReason | edgeReason () const |
| bool | isFalseDep () const |
| bool | guardUse () const |
| bool | certainAlias () const |
| bool | tailPseudo () const |
| bool | headPseudo () const |
| bool | isBackEdge () const |
| int | loopDepth () const |
| bool | isGPREdge () const |
| bool | isRegisterOrRA () const |
| bool | isWAW () const |
| bool | isRAW () const |
| const TCEString | data () const |
| bool | operator== (const DataDependenceEdge &other) const |
| void | setData (const TCEString &newData) |
Public Member Functions inherited from GraphEdge | |
| GraphEdge () | |
| GraphEdge (const GraphEdge &edge) | |
| virtual GraphEdge * | clone () const |
| virtual | ~GraphEdge () |
| virtual int | edgeID () const |
| virtual TCEString | dotString () const |
| int | weight () const |
| void | setWeight (int w) |
Static Public Member Functions | |
| static void | printStats (std::ostream &out) |
Static Public Attributes | |
| static int | regAntidepCount_ = 0 |
Private Types | |
| enum | EdgePropertyFlags { EPF_GUARD = 1 << 0 , EPF_CERTAIN_ALIAS = 1 << 1 , EPF_TAIL_PSEUDO = 1 << 2 , EPF_HEAD_PSEUDO = 1 << 3 } |
Private Member Functions | |
| TCEString | depTypeSt () const |
| TCEString | edgeReasonSt () const |
| TCEString | guardSt () const |
| TCEString | pseudoSt () const |
| TCEString | latencySt (MoveNode &node) const |
Private Attributes | |
| unsigned char | dependenceType_ |
| unsigned char | edgeReason_ |
| unsigned char | edgeProperties_ |
| unsigned char | loopEdge_ |
| char * | data_ |
Definition at line 43 of file DataDependenceEdge.hh.
| Enumerator | |
|---|---|
| DEP_UNKNOWN | |
| DEP_RAW | |
| DEP_WAR | |
| DEP_WAW | |
| DEP_TRIGGER | |
Definition at line 45 of file DataDependenceEdge.hh.
|
private |
| Enumerator | |
|---|---|
| EPF_GUARD | |
| EPF_CERTAIN_ALIAS | |
| EPF_TAIL_PSEUDO | |
| EPF_HEAD_PSEUDO | |
Definition at line 169 of file DataDependenceEdge.hh.
| Enumerator | |
|---|---|
| EDGE_REGISTER | |
| EDGE_MEMORY | |
| EDGE_FUSTATE | |
| EDGE_OPERATION | |
| EDGE_RA | |
Definition at line 52 of file DataDependenceEdge.hh.
| DataDependenceEdge::DataDependenceEdge | ( | EdgeReason | edgereason, |
| DependenceType | deptype, | ||
| TCEString | data, | ||
| bool | guard = false, |
||
| bool | certainAlias = false, |
||
| bool | tailPs = false, |
||
| bool | headPs = false, |
||
| int | loopEdge = 0 |
||
| ) |
Constructor.
| edgereason | which kind of data caused this dependence, is it register, memory, operation, ra etc. |
| deptype | whether this is real dependence(raw), antidependence(war) or output dependence(waw) |
| data | some data about the dependence, for example reg name. |
| guard | if this dependence is a guard use. |
| certainAlias | if this memory dep is a known to always alias. |
| tailPS | whether the tail of the dep is a pseudo data usage |
| headPS | whether the head of the dep is a pseudo data usage |
| loopEdge | loop iteration depth if the dependence goes over a loop |
Definition at line 65 of file DataDependenceEdge.cc.
References assert, certainAlias(), data(), data_, EDGE_REGISTER, edgeProperties_, edgeReason_, EPF_CERTAIN_ALIAS, EPF_GUARD, EPF_HEAD_PSEUDO, EPF_TAIL_PSEUDO, loopEdge_, and setData().

| DataDependenceEdge::DataDependenceEdge | ( | EdgeReason | edgereason, |
| DependenceType | deptype, | ||
| bool | guard = false, |
||
| bool | certainAlias = false, |
||
| bool | tailPs = false, |
||
| bool | headPs = false, |
||
| int | loopEdge = 0 |
||
| ) |
Constructor.
| edgereason | which kind of data caused this dependence, is it register, memory, operation, ra etc. |
| deptype | whether this is real dependence(raw), antidependence(war) or output dependence(waw) |
| guard | if this dependence is a guard use. |
| certainAlias | if this memory dep is a known to always alias. |
| tailPS | whether the tail of the dep is a pseudo data usage |
| headPS | whether the head of the dep is a pseudo data usage |
| loopEdge | loop iteration depth if the dependence goes over a loop |
Definition at line 110 of file DataDependenceEdge.cc.
References assert, certainAlias(), data_, EDGE_REGISTER, edgeProperties_, edgeReason_, EPF_CERTAIN_ALIAS, EPF_GUARD, EPF_HEAD_PSEUDO, EPF_TAIL_PSEUDO, and loopEdge_.

| DataDependenceEdge::DataDependenceEdge | ( | const DataDependenceEdge & | other | ) |
Copy constructor.
Because of data_ that needs to be deep copied.
Definition at line 146 of file DataDependenceEdge.cc.
References data_, dependenceType_, edgeProperties_, edgeReason_, and loopEdge_.
| DataDependenceEdge::DataDependenceEdge | ( | const DataDependenceEdge & | other, |
| bool | invertLoop | ||
| ) |
Copy constructor which may modify the loop property
| other | edge to copy @invertLoop whether to invent oop propert 0->1, 1->0 |
Definition at line 166 of file DataDependenceEdge.cc.
References data_, dependenceType_, edgeProperties_, edgeReason_, and loopEdge_.
|
inlinevirtual |
Definition at line 75 of file DataDependenceEdge.hh.
References data_.
|
inline |
Definition at line 103 of file DataDependenceEdge.hh.
References edgeProperties_, and EPF_CERTAIN_ALIAS.
Referenced by DataDependenceEdge(), DataDependenceEdge(), DataDependenceGraph::dotString(), edgeReasonSt(), and operator==().
|
inline |
Definition at line 142 of file DataDependenceEdge.hh.
References data_.
Referenced by DataDependenceGraph::copyDepsOver(), DataDependenceGraph::copyDepsOver(), DataDependenceEdge(), DataDependenceGraph::destRenamed(), DataDependenceGraph::edgeWeight(), DataDependenceGraph::guardRenamed(), operator==(), LiveRangeData::registersAlive(), DataDependenceGraph::renamedSimpleLiveRange(), DataDependenceGraph::sourceRenamed(), toString(), toString(), and BFMergeAndKeepUser::updateEdges().
|
inline |
Definition at line 88 of file DataDependenceEdge.hh.
References dependenceType_.
Referenced by ResourceConstraintAnalyzer::analyzeRegisterAntideps(), CycleLookBackSoftwareBypasser::bypassNode(), BFRemoveLoopChecksAndJump::checkAliveMove(), BFRemoveLoopChecksAndJump::checkAlivePO(), PreOptimizer::checkGuardReversalAllowed(), CopyingDelaySlotFiller::checkIncomingDeps(), DataDependenceGraph::combineNodes(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::destRenamed(), DataDependenceGraph::edgeWeight(), BF2Scheduler::findBypassEdge(), DataDependenceGraph::findLimitingAntidependenceDestination(), DataDependenceGraph::findLimitingAntidependenceSource(), DataDependenceGraph::findLiveRange(), DataDependenceGraph::findLoopIndexInit(), RegisterCopyAdder::fixDDGEdgesInTempReg(), RegisterCopyAdder::fixDDGEdgesInTempRegChain(), RegisterCopyAdder::fixDDGEdgesInTempRegChainImmediate(), DataDependenceGraph::guardRawPredecessors(), DataDependenceGraph::guardRenamed(), PreOptimizer::inverseGuardsOfHeads(), DataDependenceGraph::isLoopInvariant(), DataDependenceGraph::mergeAndKeepSource(), ProgramDependenceGraph::moveDDGedges(), DataDependenceGraph::onlyIncomingGuard(), BFRemoveLoopChecksAndJump::operator()(), DataDependenceGraph::queueRawPredecessors(), LiveRangeData::registersAlive(), DataDependenceGraph::regRawPredecessors(), DataDependenceGraph::regRawSuccessors(), DataDependenceGraph::regWarSuccessors(), DataDependenceGraph::regWawSuccessors(), BFRemoveLoopChecksAndJump::removeMoveFromQueue(), BFRemoveLoopChecksAndJump::removePoFromQueue(), DataDependenceGraph::renamedSimpleLiveRange(), DataDependenceGraph::sanityCheck(), DataDependenceGraph::sourceRenamed(), PreOptimizer::tryToOptimizeAddressReg(), BasicBlockScheduler::tryToOptimizeWaw(), BUBasicBlockScheduler::tryToOptimizeWaw(), and BFMergeAndKeepUser::updateEdges().
|
private |
Helper method for creating the toString string.
Definition at line 258 of file DataDependenceEdge.cc.
References DEP_RAW, DEP_UNKNOWN, DEP_WAR, DEP_WAW, and dependenceType_.
Referenced by toString(), and toString().
|
inline |
Definition at line 91 of file DataDependenceEdge.hh.
References edgeReason_.
Referenced by ResourceConstraintAnalyzer::analyzeRegisterAntideps(), CycleLookBackSoftwareBypasser::bypassNode(), DataDependenceGraph::combineNodes(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::destRenamed(), DataDependenceGraph::dotString(), DataDependenceGraph::edgeWeight(), BF2Scheduler::findBypassEdge(), DataDependenceGraph::findLimitingAntidependenceDestination(), DataDependenceGraph::findLimitingAntidependenceSource(), DataDependenceGraph::findLiveRange(), DataDependenceGraph::findLoopIndexInit(), RegisterCopyAdder::fixDDGEdgesInTempReg(), RegisterCopyAdder::fixDDGEdgesInTempRegChain(), RegisterCopyAdder::fixDDGEdgesInTempRegChainImmediate(), DataDependenceGraph::guardRenamed(), isGPREdge(), ExecutionPipelineResource::isLoopBypass(), DataDependenceGraph::isLoopInvariant(), isRegisterOrRA(), ProgramDependenceGraph::moveDDGedges(), DataDependenceGraph::moveFUDependenciesToTrigger(), DataDependenceGraph::queueRawPredecessors(), LiveRangeData::registersAlive(), DataDependenceGraph::regRawPredecessors(), DataDependenceGraph::regRawSuccessors(), DataDependenceGraph::regWarSuccessors(), DataDependenceGraph::regWawSuccessors(), DataDependenceGraph::renamedSimpleLiveRange(), DataDependenceGraph::sanityCheck(), DataDependenceGraph::sourceRenamed(), PreOptimizer::tryToOptimizeAddressReg(), BasicBlockScheduler::tryToOptimizeWaw(), BUBasicBlockScheduler::tryToOptimizeWaw(), and BFMergeAndKeepUser::updateEdges().
|
private |
Helper method for creating the toString string.
Definition at line 235 of file DataDependenceEdge.cc.
References certainAlias(), EDGE_FUSTATE, EDGE_MEMORY, EDGE_OPERATION, EDGE_RA, EDGE_REGISTER, and edgeReason_.
Referenced by toString(), and toString().

|
private |
Helper method for creating the toString string.
Definition at line 276 of file DataDependenceEdge.cc.
References guardUse().
Referenced by toString(), and toString().

|
inline |
Definition at line 100 of file DataDependenceEdge.hh.
References edgeProperties_, and EPF_GUARD.
Referenced by CycleLookBackSoftwareBypasser::bypassNode(), PreOptimizer::checkGuardReversalAllowed(), CopyingDelaySlotFiller::checkIncomingDeps(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::destRenamed(), DataDependenceGraph::edgeWeight(), BF2Scheduler::findBypassEdge(), DataDependenceGraph::findLimitingAntidependenceDestination(), DataDependenceGraph::findLimitingAntidependenceSource(), DataDependenceGraph::findLiveRange(), RegisterCopyAdder::fixDDGEdgesInTempReg(), RegisterCopyAdder::fixDDGEdgesInTempRegChain(), RegisterCopyAdder::fixDDGEdgesInTempRegChainImmediate(), DataDependenceGraph::guardRawPredecessors(), DataDependenceGraph::guardRenamed(), guardSt(), PreOptimizer::inverseGuardsOfHeads(), DataDependenceGraph::isLoopInvariant(), DataDependenceGraph::mergeAndKeepSource(), DataDependenceGraph::onlyIncomingGuard(), operator==(), DataDependenceGraph::queueRawPredecessors(), DataDependenceGraph::sourceRenamed(), PreOptimizer::tryToOptimizeAddressReg(), and BFMergeAndKeepUser::updateEdges().
|
inline |
returns whether the head of the dependence does not directly write/read the data but instead is a control flow move which may cause it to be read/written
Definition at line 115 of file DataDependenceEdge.hh.
References edgeProperties_, and EPF_HEAD_PSEUDO.
Referenced by CycleLookBackSoftwareBypasser::bypassNode(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::destRenamed(), DataDependenceGraph::edgeWeight(), BF2Scheduler::findBypassEdge(), DataDependenceGraph::findLimitingAntidependenceDestination(), DataDependenceGraph::findLimitingAntidependenceSource(), DataDependenceGraph::findLiveRange(), RegisterCopyAdder::fixDDGEdgesInTempReg(), RegisterCopyAdder::fixDDGEdgesInTempRegChain(), RegisterCopyAdder::fixDDGEdgesInTempRegChainImmediate(), DataDependenceGraph::guardRenamed(), operator==(), pseudoSt(), DataDependenceGraph::queueRawPredecessors(), LiveRangeData::registersAlive(), DataDependenceGraph::renamedSimpleLiveRange(), and DataDependenceGraph::sourceRenamed().
|
inlinevirtual |
Reimplemented from GraphEdge.
Definition at line 118 of file DataDependenceEdge.hh.
References loopEdge_.
Referenced by CycleLookBackSoftwareBypasser::bypassNode(), DataDependenceGraph::dotString(), DataDependenceGraph::dropBackEdges(), BF2Scheduler::findBypassEdge(), DataDependenceGraph::findBypassSource(), DataDependenceGraph::findLiveRange(), DataDependenceGraph::findLoopIndexInit(), ExecutionPipelineResource::isLoopBypass(), BFEarlyBypasser::operator()(), BFMergeAndKeepUser::operator()(), operator==(), DataDependenceGraph::queueRawPredecessors(), DataDependenceGraph::regRawPredecessors(), BFPostpassBypasser::tryBypassNode(), and PreOptimizer::tryToOptimizeAddressReg().
|
inline |
Definition at line 95 of file DataDependenceEdge.hh.
References DEP_WAR, DEP_WAW, dependenceType_, EDGE_OPERATION, and edgeReason_.
Referenced by ResourceConstraintAnalyzer::analyzeRegisterAntideps(), DataDependenceGraph::dotString(), and BFMergeAndKeepUser::operator()().
|
inline |
Definition at line 125 of file DataDependenceEdge.hh.
References EDGE_REGISTER, and edgeReason().

|
inline |
Definition at line 138 of file DataDependenceEdge.hh.
References DEP_RAW, and dependenceType_.
|
inline |
Definition at line 129 of file DataDependenceEdge.hh.
References EDGE_RA, EDGE_REGISTER, and edgeReason().

|
inline |
Definition at line 134 of file DataDependenceEdge.hh.
References DEP_WAW, and dependenceType_.
Helper method for creating the toString string. Finds out the latency of operation dependences.
Definition at line 294 of file DataDependenceEdge.cc.
References TTAProgram::Move::destination(), EDGE_OPERATION, edgeReason_, TTAProgram::TerminalFUPort::hwOperation(), MoveNode::isAssigned(), TTAProgram::Move::isTriggering(), TTAMachine::HWOperation::latency(), and MoveNode::move().
Referenced by toString().

|
inline |
Definition at line 121 of file DataDependenceEdge.hh.
References loopEdge_.
Referenced by ResourceConstraintAnalyzer::analyzeRegisterAntideps(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::copyDepsOver(), and DataDependenceGraph::renamedSimpleLiveRange().
| bool DataDependenceEdge::operator== | ( | const DataDependenceEdge & | other | ) | const |
Comparator.
Checks whether the two edges are identical.
Definition at line 319 of file DataDependenceEdge.cc.
References certainAlias(), data(), dependenceType_, edgeReason_, guardUse(), headPseudo(), isBackEdge(), and tailPseudo().

|
static |
Prints statistics about the created edges to the given output stream.
Definition at line 191 of file DataDependenceEdge.cc.
References regAntidepCount_.
|
private |
Helper method for creating the toString string.
Definition at line 284 of file DataDependenceEdge.cc.
References headPseudo(), and tailPseudo().
Referenced by toString(), and toString().

| ObjectState * DataDependenceEdge::saveState | ( | const MoveNode & | tail, |
| const MoveNode & | head | ||
| ) |
State dumping for XML generation.
| tail | source node of the edge |
| head | sink node of the edge |
Definition at line 345 of file DataDependenceEdge.cc.
References DEP_RAW, DEP_TRIGGER, DEP_UNKNOWN, DEP_WAR, DEP_WAW, dependenceType_, TTAProgram::Move::destination(), EDGE_FUSTATE, EDGE_MEMORY, EDGE_OPERATION, EDGE_RA, EDGE_REGISTER, edgeReason_, TTAProgram::TerminalFUPort::hwOperation(), MoveNode::isMove(), TTAProgram::Move::isTriggering(), TTAMachine::HWOperation::latency(), loopEdge_, MoveNode::move(), GraphNode::nodeID(), ObjectState::setName(), ObjectState::setValue(), and Conversion::toString().
Referenced by DataDependenceGraph::writeToXMLFile().

| void DataDependenceEdge::setData | ( | const TCEString & | newData | ) |
Definition at line 331 of file DataDependenceEdge.cc.
References data_.
Referenced by DataDependenceEdge(), DataDependenceGraph::destRenamed(), DataDependenceGraph::guardRenamed(), and DataDependenceGraph::sourceRenamed().
|
inline |
returns whether the tail of the dependence does not directly write/read the data but instead is a control flow move which may cause it to be read/written
Definition at line 109 of file DataDependenceEdge.hh.
References edgeProperties_, and EPF_TAIL_PSEUDO.
Referenced by DataDependenceGraph::copyDepsOver(), DataDependenceGraph::copyDepsOver(), DataDependenceGraph::destRenamed(), DataDependenceGraph::findLimitingAntidependenceDestination(), DataDependenceGraph::findLimitingAntidependenceSource(), DataDependenceGraph::findLiveRange(), RegisterCopyAdder::fixDDGEdgesInTempReg(), RegisterCopyAdder::fixDDGEdgesInTempRegChain(), RegisterCopyAdder::fixDDGEdgesInTempRegChainImmediate(), DataDependenceGraph::guardRenamed(), operator==(), pseudoSt(), DataDependenceGraph::queueRawPredecessors(), LiveRangeData::registersAlive(), DataDependenceGraph::renamedSimpleLiveRange(), DataDependenceGraph::sourceRenamed(), BasicBlockScheduler::tryToOptimizeWaw(), BUBasicBlockScheduler::tryToOptimizeWaw(), and BFMergeAndKeepUser::updateEdges().
|
virtual |
Returns a textual representation of the edge.
This is used in the generated dot files.
Reimplemented from GraphEdge.
Definition at line 201 of file DataDependenceEdge.cc.
References data(), depTypeSt(), edgeReasonSt(), guardSt(), loopEdge_, pseudoSt(), and Conversion::toString().
Referenced by ResourceConstraintAnalyzer::analyzeRegisterAntideps(), DataDependenceGraph::dotString(), BFRemoveEdge::operator()(), ProgramDependenceEdge::toString(), and BFRemoveEdge::undoOnlyMe().

Returns a textual representation of the edge.
| tail | the source node of the dependence. Needed for looking up operation latencies in scheduled code. |
This is used in the generated dot files.
Definition at line 221 of file DataDependenceEdge.cc.
References data(), depTypeSt(), edgeReasonSt(), guardSt(), latencySt(), loopEdge_, pseudoSt(), and Conversion::toString().

|
private |
Definition at line 181 of file DataDependenceEdge.hh.
Referenced by data(), DataDependenceEdge(), DataDependenceEdge(), DataDependenceEdge(), DataDependenceEdge(), setData(), and ~DataDependenceEdge().
|
private |
Definition at line 176 of file DataDependenceEdge.hh.
Referenced by DataDependenceEdge(), DataDependenceEdge(), dependenceType(), depTypeSt(), isFalseDep(), isRAW(), isWAW(), operator==(), and saveState().
|
private |
Definition at line 178 of file DataDependenceEdge.hh.
Referenced by certainAlias(), DataDependenceEdge(), DataDependenceEdge(), DataDependenceEdge(), DataDependenceEdge(), guardUse(), headPseudo(), and tailPseudo().
|
private |
Definition at line 177 of file DataDependenceEdge.hh.
Referenced by DataDependenceEdge(), DataDependenceEdge(), DataDependenceEdge(), DataDependenceEdge(), edgeReason(), edgeReasonSt(), isFalseDep(), latencySt(), operator==(), and saveState().
|
private |
Definition at line 179 of file DataDependenceEdge.hh.
Referenced by DataDependenceEdge(), DataDependenceEdge(), DataDependenceEdge(), DataDependenceEdge(), isBackEdge(), loopDepth(), saveState(), toString(), and toString().
|
static |
Definition at line 154 of file DataDependenceEdge.hh.
Referenced by printStats().