OpenASIP
2.0
|
#include <RegisterCopyAdder.hh>
Classes | |
struct | AddedRegisterCopies |
Public Types | |
typedef std::map< const MoveNode *, DataDependenceGraph::NodeSet > | AddedRegisterCopyMap |
Public Member Functions | |
RegisterCopyAdder (InterPassData &data, SimpleResourceManager &rm, MoveNodeSelector &selector, bool buScheduler=false) | |
virtual | ~RegisterCopyAdder () |
AddedRegisterCopies | addMinimumRegisterCopies (ProgramOperation &programOperation, const TTAMachine::Machine &targetMachine, DataDependenceGraph *ddg) |
void | operandsScheduled (AddedRegisterCopies &copies, DataDependenceGraph &ddg) |
void | resultsScheduled (AddedRegisterCopies &copies, DataDependenceGraph &ddg) |
AddedRegisterCopies | addRegisterCopiesToRRMove (MoveNode &moveNode, DataDependenceGraph *ddg) |
Static Public Member Functions | |
static void | findTempRegisters (const TTAMachine::Machine &machine, InterPassData &ipd) |
static void | fixDDGEdgesInTempReg (DataDependenceGraph &ddg, MoveNode &originalMove, MoveNode *firstMove, MoveNode *lastMove, const TTAMachine::RegisterFile *lastRF, int lastRegisterIndex, BasicBlockNode ¤tBBNode, bool bottomUpScheduling, bool loopScheduling) |
Private Types | |
typedef std::map< const TTAMachine::FunctionUnit *, int, TTAMachine::FunctionUnit::Comparator > | RegisterCopyCountIndex |
container for storing the required register copies if the operation was bound to the given FU More... | |
Private Member Functions | |
bool | isAllowedUnit (const TTAMachine::FunctionUnit &fu, const ProgramOperation &po) |
AddedRegisterCopies | addRegisterCopies (ProgramOperation &programOperation, const TTAMachine::FunctionUnit &fu, bool countOnly=true, DataDependenceGraph *ddg=NULL, int neededCopies=0) |
int | addConnectionRegisterCopies (MoveNode &originalMove, const TTAMachine::Port &sourcePort, const TTAMachine::Port &destinationPort, bool countOnly=true, DataDependenceGraph *ddg=NULL, DataDependenceGraph::NodeSet *addedNodes=NULL, int neededCopies=0) |
int | addConnectionRegisterCopiesImmediate (MoveNode &originalMove, const TTAMachine::Port &destinationPort, bool countOnly=true, DataDependenceGraph *ddg=NULL, DataDependenceGraph::NodeSet *addedNodes=NULL) |
int | addConnectionRegisterCopies (MoveNode &moveNode, const TTAMachine::FunctionUnit &fu, bool countOnly=true, DataDependenceGraph *ddg=NULL, DataDependenceGraph::NodeSet *addedNodes=NULL, int neededCopies=0) |
int | countAndAddConnectionRegisterCopiesToRR (MoveNode &moveNode, DataDependenceGraph *ddg=NULL, DataDependenceGraph::NodeSet *addedNodes=NULL) |
void | addCandidateSetAnnotations (ProgramOperation &programOperation, const TTAMachine::Machine &machine) |
void | fixDDGEdgesInTempRegChain (DataDependenceGraph &ddg, MoveNode &originalMove, MoveNode *firstMove, std::vector< MoveNode * > intMoves, MoveNode *lastMove, const TTAMachine::RegisterFile *firstRF, std::vector< const TTAMachine::RegisterFile * > intRF, const TTAMachine::RegisterFile *lastRF, int firstRegisterIndex, std::vector< int > intRegisterIndex, int lastRegisterIndex, int regsRequired, BasicBlockNode ¤tBBNode) |
void | fixDDGEdgesInTempRegChainImmediate (DataDependenceGraph &ddg, MoveNode &originalMove, MoveNode *firstMove, MoveNode *regToRegCopy, MoveNode *lastMove, const TTAMachine::RegisterFile *tempRF1, const TTAMachine::RegisterFile *tempRF2, int tempRegisterIndex1, int tempRegisterIndex2, BasicBlockNode ¤tBBNode) |
RegisterCopyCountIndex | requiredRegisterCopiesForEachFU (const TTAMachine::Machine &targetMachine, ProgramOperation &programOperation) |
Static Private Member Functions | |
static void | createAntidepsForReg (const MoveNode &defMove, const MoveNode &useMove, const MoveNode &originalMove, const TTAMachine::RegisterFile &rf, int index, DataDependenceGraph &ddg, BasicBlockNode &bbn, bool backwards, bool loopScheduling) |
Private Attributes | |
InterPassData & | interPassData_ |
the inter pass data from which to fetch the scratch register list More... | |
SimpleResourceManager & | rm_ |
the resource manager to check for machine resources in heuristics More... | |
bool | buScheduler_ |
Indicate that register copy adder is called from bottom up scheduler, this causes search for first scheduled register write instead of last read. More... | |
Adds register copies through connected register files in case of missing connectivity in the operand moves of operations.
In addition, annotates the moves in the operation with missing connectivity with the function unit candidates that are connected to all operand moves of the operation. The annotations should be checked and followed by the resource assignment stage to avoid scheduling failure due to missing connectivity. That is, after executing this pass, the scheduler (and resource assigner) can assume there is enough connectivity in the machine to schedule all moves of the operation (given the candidate FU annotations are adhered to).
Immediates that must be converted to long immediates are annotated with the required IU which is guaranteed to have connectivity to the target FU. The RM/scheduler, when converting a short immediate to a long immediate must take this annotation in account, otherwise scheduling error might occur. It tries to minimize the added temp register copies for the operation by considering all possible FU bindings to each operation.
The pass inputs a DDG with registers allocated but other resources unassigned in the considered operation and outputs a DDG with register copy moves inserted due to missing connectivity. Operation moves are annotated with candidate function units and immediate units for operation and immediate assignments. In case all function units / immediate units are equal candidates according to connectivity, no annotations are inserted as the FU/IU can be assigned freely to the operation/immediate.
The candidate annotatons must be adhered to in resource assignment, otherwise the scheduling might fail due to missing connectivity.
Definition at line 91 of file RegisterCopyAdder.hh.
typedef std::map<const MoveNode*, DataDependenceGraph::NodeSet> RegisterCopyAdder::AddedRegisterCopyMap |
Definition at line 102 of file RegisterCopyAdder.hh.
|
private |
container for storing the required register copies if the operation was bound to the given FU
Definition at line 231 of file RegisterCopyAdder.hh.
RegisterCopyAdder::RegisterCopyAdder | ( | InterPassData & | data, |
SimpleResourceManager & | rm, | ||
MoveNodeSelector & | selector, | ||
bool | buScheduler = false |
||
) |
Constructor.
data | The inter-pass data. |
rm | The resource manager used to check for availability of resources. |
Definition at line 74 of file RegisterCopyAdder.cc.
|
virtual |
|
private |
Adds candidate FU annotations to the operation moves in case there is a limited set of FUs the operation can be assigned to.
programOperation | The operation of which moves to annotate. |
machine | The machine which contains the FUs. |
Definition at line 2002 of file RegisterCopyAdder.cc.
References TTAProgram::AnnotatedInstructionElement::addAnnotation(), TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_DST, TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_SRC, ProgramOperation::inputMove(), ProgramOperation::inputMoveCount(), isAllowedUnit(), machine, MoveNode::move(), TTAMachine::Component::name(), ProgramOperation::outputMove(), ProgramOperation::outputMoveCount(), and requiredRegisterCopiesForEachFU().
Referenced by addMinimumRegisterCopies().
|
private |
Adds register copies required for the given transport.
Returns 0 in case there is a connection already.
moveNode | The transport. |
fu | The assumed function unit assigned to the operation of the move. |
countOnly | whether to just count or really do the reg copies. |
ddg | ddg to be updated. |
addedNode | place to put data about added regcopies. |
Check that there is a bus with wide enough immediate slot that is connected to the target, if not, convert the "constant to an operand move" to "a constant to a register move".
This way we ensure connectivity after IU assignment.
Convert:
IMM -> FU
to
IMM -> RF RF -> FU
In case IMM does not fit in any bus, after scheduler's LIMM conversion, this should end up being:
[IMM -> IU] (long immediate transport) IU -> RF RF -> FU
This should fix the following cases: 1) IMM only fits in a bus that is not directly connected to the FU. 2) IMM does not fit in any bus, thus should be transported through an IU. In that case, ensure connectivity between a IU and FU.
Definition at line 1765 of file RegisterCopyAdder.cc.
References __func__, abortWithError, addConnectionRegisterCopies(), addConnectionRegisterCopiesImmediate(), SimpleResourceManager::canTransportImmediate(), MachineConnectivityCheck::canTransportImmediate(), TTAMachine::Machine::controlUnit(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAProgram::Move::destination(), TTAProgram::Terminal::hintOperation(), TTAMachine::Machine::immediateUnitNavigator(), MachineConnectivityCheck::isConnected(), TTAProgram::Terminal::isFUPort(), TTAProgram::Terminal::isGPR(), TTAProgram::Terminal::isImmediate(), TTAMachine::Port::isInput(), TTAMachine::Port::isOutput(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::machine(), MoveNode::move(), Operation::name(), TTAMachine::FunctionUnit::operation(), TTAProgram::Terminal::operationIndex(), TTAMachine::BaseRegisterFile::port(), TTAMachine::HWOperation::port(), TTAProgram::Terminal::port(), TTAMachine::Unit::portCount(), TTAProgram::Terminal::registerFile(), TTAMachine::ControlUnit::returnAddressPort(), rm_, TTAProgram::Move::source(), and MoveNode::toString().
|
private |
Adds or counts register copies required for a move between the given ports.
Returns 0 in case there is a connection already.
originalMove | The move that might not be unschedulable due to missing connectivity. Will be modified to read from the temporary reg instead in case connectivity is missing. |
sourcePort | The source port. |
destinationPort | The destination port. |
countOnly | whether to only count or do the register copies. |
ddg | ddg to update |
addedNodes | place to store information about added regcopies. |
Exception | Throws in case the machine does not have enough connectivity even when 2 register copies are used. |
Definition at line 328 of file RegisterCopyAdder.cc.
References __func__, TTAProgram::AnnotatedInstructionElement::addAnnotation(), DataDependenceGraph::addNode(), TTAProgram::ProgramAnnotation::ANN_CONNECTIVITY_MOVE, TTAProgram::ProgramAnnotation::ANN_STACKFRAME_PROCEDURE_RETURN, assert, buScheduler_, TTAProgram::TerminalRegister::copy(), TTAProgram::Move::copy(), TTAProgram::Terminal::copy(), InterPassData::datum(), TTAProgram::Move::destination(), fixDDGEdgesInTempReg(), fixDDGEdgesInTempRegChain(), DataDependenceGraph::getBasicBlockNode(), DataDependenceGraph::guardsAllowBypass(), InterPassData::hasDatum(), interPassData_, MachineConnectivityCheck::isConnected(), TTAProgram::Terminal::isFUPort(), TTAProgram::Terminal::isGPR(), TTAProgram::Terminal::isRA(), TTAProgram::Move::isReturn(), Application::logStream(), DataDependenceGraph::mergeAndKeepUser(), MoveNode::move(), TTAMachine::Component::name(), DataDependenceGraph::onlyRegisterRawSource(), TTAMachine::Port::parentUnit(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), TTAProgram::Terminal::registerFile(), DataDependenceGraph::rWarEdgesOut(), TTAProgram::AnnotatedInstructionElement::setAnnotation(), TTAProgram::Move::setDestination(), TTAProgram::Move::setSource(), TTAProgram::Move::source(), MoveNode::toString(), TTAMachine::BaseRegisterFile::width(), and TTAMachine::Port::width().
Referenced by addConnectionRegisterCopies(), addRegisterCopies(), and countAndAddConnectionRegisterCopiesToRR().
|
private |
Adds register copies required for transporting an immediate to the given port.
If there is at least one IU that is connected to the destination and the immediate is going to be converted to a long immediate, does not add any temp registers, but annotates the move with the IU choice so RM can assign it correctly later.
originalMove | The move that cannot be scheduled due to missing connectivity. Will be modified to read from the temporary reg instead. |
destinationPort | The destination port. |
countOnly | whether to count only or do the reg copies. |
ddg | ddg to update, or null if none. |
addedNodes | place to put data about added reg copies. |
Exception | Throws in case the machine does not have enough connectivity even when 2 register copies are used or no scratch registers to redirect unconnected moves through. |
Definition at line 767 of file RegisterCopyAdder.cc.
References __func__, abortWithError, TTAProgram::AnnotatedInstructionElement::addAnnotation(), DataDependenceGraph::addNode(), TTAProgram::ProgramAnnotation::ANN_CONNECTIVITY_MOVE, TTAProgram::ProgramAnnotation::ANN_STACKFRAME_PROCEDURE_RETURN, assert, MachineConnectivityCheck::canTransportImmediate(), TTAProgram::TerminalRegister::copy(), TTAProgram::Move::copy(), TTAProgram::Terminal::copy(), InterPassData::datum(), TTAProgram::Move::destination(), fixDDGEdgesInTempRegChainImmediate(), DataDependenceGraph::getBasicBlockNode(), InterPassData::hasDatum(), interPassData_, MachineConnectivityCheck::isConnected(), TTAProgram::Terminal::isFUPort(), TTAProgram::Terminal::isGPR(), TTAProgram::Move::isReturn(), MoveNode::isSourceConstant(), TTAMachine::Component::machine(), MoveNode::move(), TTAMachine::Component::name(), TTAMachine::Port::parentUnit(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), MachineConnectivityCheck::requiredImmediateWidth(), TTAProgram::AnnotatedInstructionElement::setAnnotation(), TTAProgram::Move::setDestination(), TTAProgram::Move::setSource(), TTAProgram::Move::source(), TTAProgram::Move::toString(), MoveNode::toString(), and TTAMachine::BaseRegisterFile::width().
Referenced by addConnectionRegisterCopies().
RegisterCopyAdder::AddedRegisterCopies RegisterCopyAdder::addMinimumRegisterCopies | ( | ProgramOperation & | programOperation, |
const TTAMachine::Machine & | targetMachine, | ||
DataDependenceGraph * | ddg | ||
) |
Adds minimum register copies required for the given operation.
Adds the register copies to the given DDG along with required new edges between the copy moves and annotates the moves with a candidate set for the FU binding.
programOperation | The operation execution. |
targetMachine | The target machine. |
ddg | ddg which to update when adding temp reg moves. Can be NULL. |
In | case there was no such FU that could be connected with a temp register chain of maximal length of 2 copies. |
Definition at line 139 of file RegisterCopyAdder.cc.
References __func__, addCandidateSetAnnotations(), addRegisterCopies(), isAllowedUnit(), Application::logStream(), requiredRegisterCopiesForEachFU(), and ProgramOperation::toString().
Referenced by SequentialScheduler::scheduleOperation(), BasicBlockScheduler::scheduleOperation(), and BUBasicBlockScheduler::scheduleOperation().
|
private |
Adds or counts register copies required for the given operation to be assigned without connectivity problems to the given FU.
programOperation | The operation execution. |
fu | The function unit the operation should be able to be assigned to. |
countOnly | whether to only count or do the register copies. |
ddg | ddg to update, or NULL. |
Definition at line 257 of file RegisterCopyAdder.cc.
References addConnectionRegisterCopies(), assert, RegisterCopyAdder::AddedRegisterCopies::count_, ProgramOperation::inputMove(), ProgramOperation::inputMoveCount(), Application::logStream(), RegisterCopyAdder::AddedRegisterCopies::operandCopies_, ProgramOperation::outputMove(), ProgramOperation::outputMoveCount(), RegisterCopyAdder::AddedRegisterCopies::resultCopies_, and MoveNode::toString().
Referenced by addMinimumRegisterCopies(), and requiredRegisterCopiesForEachFU().
RegisterCopyAdder::AddedRegisterCopies RegisterCopyAdder::addRegisterCopiesToRRMove | ( | MoveNode & | moveNode, |
DataDependenceGraph * | ddg | ||
) |
Adds or counts register copies required for a given R-R move to be assigned without connectivity problems.
The | given R-R move. |
ddg | ddg to update, or NULL. |
Definition at line 212 of file RegisterCopyAdder.cc.
References assert, RegisterCopyAdder::AddedRegisterCopies::count_, countAndAddConnectionRegisterCopiesToRR(), Application::logStream(), RegisterCopyAdder::AddedRegisterCopies::operandCopies_, and MoveNode::toString().
Referenced by SequentialScheduler::scheduleRRMove(), BasicBlockScheduler::scheduleRRMove(), and BUBasicBlockScheduler::scheduleRRMove().
|
private |
Adds register copies required for the given RR transport.
Returns 0 in case there is a connection already.
moveNode | The transport. |
fu | The assumed function unit assigned to the operation of the move. |
countOnly | whether to just count or really do the reg copies. |
ddg | ddg to be updated. |
addedNode | place to put data about added regcopies. |
Definition at line 1638 of file RegisterCopyAdder.cc.
References __func__, abortWithError, addConnectionRegisterCopies(), TTAProgram::Move::destination(), MachineConnectivityCheck::isConnected(), TTAProgram::Terminal::isGPR(), TTAProgram::Terminal::isImmediate(), TTAMachine::Port::isInput(), TTAMachine::Port::isOutput(), TTAProgram::Terminal::isRA(), MoveNode::move(), TTAMachine::BaseRegisterFile::port(), TTAProgram::Terminal::port(), TTAMachine::Unit::portCount(), TTAProgram::Terminal::registerFile(), TTAProgram::Move::source(), and MoveNode::toString().
Referenced by addRegisterCopiesToRRMove().
|
staticprivate |
Definition at line 1312 of file RegisterCopyAdder.cc.
References BasicBlockNode::basicBlock(), BoostGraph< GraphNode, GraphEdge >::connectNodes(), DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::EDGE_REGISTER, DataDependenceGraph::exclusingGuards(), DataDependenceGraph::firstScheduledRegisterKill(), DataDependenceGraph::firstScheduledRegisterWrites(), TTAProgram::Move::isUnconditional(), DataDependenceGraph::lastScheduledRegisterKill(), DataDependenceGraph::lastScheduledRegisterReads(), DataDependenceGraph::lastScheduledRegisterWrites(), TTAProgram::BasicBlock::liveRangeData_, MoveNode::move(), LiveRangeData::regDefines_, LiveRangeData::regFirstDefines_, LiveRangeData::regFirstUses_, DisassemblyRegister::registerName(), and LiveRangeData::regLastUses_.
Referenced by fixDDGEdgesInTempReg(), fixDDGEdgesInTempRegChain(), and fixDDGEdgesInTempRegChainImmediate().
|
static |
Find the temporary registers usef for reg copies
Definition at line 2136 of file RegisterCopyAdder.cc.
References TTAMachine::Machine::busNavigator(), AssocTools::containsKey(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::RegisterGuard::registerFile(), TTAMachine::RegisterGuard::registerIndex(), InterPassData::setDatum(), TTAMachine::BaseRegisterFile::size(), MachineConnectivityCheck::tempRegisterFiles(), and TTAMachine::BaseRegisterFile::width().
Referenced by llvm::LLVMTCEIRBuilder::LLVMTCEIRBuilder().
|
static |
Fixes edges in DDG when only one additional register is required.
ddg | The DDG to fix. |
originalMove | The move which got the temp reg chain added. |
firstMove | First move in the chain. |
lastMove | The last move in the chain. |
tempRF | The RF used for the temp move. |
lastRegisterIndex | The index of the temp register. |
Definition at line 1048 of file RegisterCopyAdder.cc.
References assert, BoostGraph< GraphNode, GraphEdge >::connectNodes(), BoostGraph< GraphNode, GraphEdge >::copyInEdge(), BoostGraph< GraphNode, GraphEdge >::copyOutEdge(), createAntidepsForReg(), DataDependenceEdge::DEP_RAW, DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), DataDependenceEdge::EDGE_RA, DataDependenceEdge::EDGE_REGISTER, DataDependenceEdge::edgeReason(), DataDependenceEdge::guardUse(), DataDependenceEdge::headPseudo(), BoostGraph< GraphNode, GraphEdge >::inEdges(), BoostGraph< GraphNode, GraphEdge >::moveInEdge(), BoostGraph< GraphNode, GraphEdge >::moveOutEdge(), TTAMachine::Component::name(), BoostGraph< GraphNode, GraphEdge >::outEdges(), BoostGraph< GraphNode, GraphEdge >::rootGraph(), DataDependenceEdge::tailPseudo(), and Conversion::toString().
Referenced by addConnectionRegisterCopies().
|
private |
Fixes edges in DDG after creating the temporary register chain.
ddg | The DDG to fix. |
originalMove | The move which got the temp reg chain added. |
firstMove | First move in the chain. |
intMov | A vector containing all the intermediate register to register copies. |
lastMove | The last move in the chain. |
firstRF | The RF used for the 1st temp move. |
lastRF | The RF used for the last temp move. |
firstRegisterIndex | The index of the 1st temp register. |
lastRegisterIndex | The index of the last temp register. |
regsRequired | The number of temp register required. |
Definition at line 1170 of file RegisterCopyAdder.cc.
References assert, buScheduler_, BoostGraph< GraphNode, GraphEdge >::connectNodes(), BoostGraph< GraphNode, GraphEdge >::copyInEdge(), BoostGraph< GraphNode, GraphEdge >::copyOutEdge(), createAntidepsForReg(), DataDependenceEdge::DEP_RAW, DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), DataDependenceEdge::EDGE_RA, DataDependenceEdge::EDGE_REGISTER, DataDependenceEdge::edgeReason(), DataDependenceEdge::guardUse(), DataDependenceEdge::headPseudo(), BoostGraph< GraphNode, GraphEdge >::inEdges(), BoostGraph< GraphNode, GraphEdge >::moveInEdge(), BoostGraph< GraphNode, GraphEdge >::moveOutEdge(), BoostGraph< GraphNode, GraphEdge >::outEdges(), DisassemblyRegister::registerName(), BoostGraph< GraphNode, GraphEdge >::rootGraph(), DataDependenceEdge::tailPseudo(), and Conversion::toString().
Referenced by addConnectionRegisterCopies().
|
private |
Fixes edges in DDG after creating the temporary register chain for the Immediate Transport.
ddg | The DDG to fix. |
originalMove | The move which got the temp reg chain added. |
firstMove | First move in the chain. |
regToRegCopy | A register to register copy in case of a chain of length 2 (NULL otherwise). |
lastMove | The last move in the chain. |
tempRF1 | The RF used for the 1st temp move. |
tempRF2 | The RF used for the 2nd temp move (optional). |
tempRegisterIndex1 | The index of the 1st temp register. |
tempRegisterIndex2 | The index of the 2nd temp register. |
Definition at line 1501 of file RegisterCopyAdder.cc.
References assert, buScheduler_, BoostGraph< GraphNode, GraphEdge >::connectNodes(), BoostGraph< GraphNode, GraphEdge >::copyInEdge(), BoostGraph< GraphNode, GraphEdge >::copyOutEdge(), createAntidepsForReg(), DataDependenceEdge::DEP_RAW, DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceEdge::dependenceType(), DataDependenceEdge::EDGE_RA, DataDependenceEdge::EDGE_REGISTER, DataDependenceEdge::edgeReason(), DataDependenceEdge::guardUse(), DataDependenceEdge::headPseudo(), BoostGraph< GraphNode, GraphEdge >::inEdges(), BoostGraph< GraphNode, GraphEdge >::moveInEdge(), BoostGraph< GraphNode, GraphEdge >::moveOutEdge(), TTAMachine::Component::name(), BoostGraph< GraphNode, GraphEdge >::outEdges(), BoostGraph< GraphNode, GraphEdge >::rootGraph(), DataDependenceEdge::tailPseudo(), and Conversion::toString().
Referenced by addConnectionRegisterCopiesImmediate().
|
private |
Definition at line 2196 of file RegisterCopyAdder.cc.
References TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_DST, TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_SRC, TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_DST, TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_SRC, TTAProgram::AnnotatedInstructionElement::hasAnnotation(), TTAProgram::AnnotatedInstructionElement::hasAnnotations(), ProgramOperation::inputMove(), ProgramOperation::inputMoveCount(), MoveNode::move(), TTAMachine::Component::name(), ProgramOperation::outputMove(), and ProgramOperation::outputMoveCount().
Referenced by addCandidateSetAnnotations(), addMinimumRegisterCopies(), and requiredRegisterCopiesForEachFU().
void RegisterCopyAdder::operandsScheduled | ( | AddedRegisterCopies & | copies, |
DataDependenceGraph & | ddg | ||
) |
Called after all operands of a move are scheduled. This creates the dependence edges between them.
copies | information about all regcopies of the po |
ddg | ddg to update |
Definition at line 2079 of file RegisterCopyAdder.cc.
References assert, DataDependenceGraph::createRegisterAntiDependenciesBetweenNodes(), MoveNode::isScheduled(), and RegisterCopyAdder::AddedRegisterCopies::operandCopies_.
Referenced by BasicBlockScheduler::scheduleOperation(), and BUBasicBlockScheduler::scheduleOperation().
|
private |
Counts the temporary register copies required for each FU in case the given operation was assigned to them.
targetMachine | The machine to use. |
Definition at line 95 of file RegisterCopyAdder.cc.
References addRegisterCopies(), TTAMachine::Machine::controlUnit(), TTAMachine::Machine::Navigator< ComponentType >::count(), RegisterCopyAdder::AddedRegisterCopies::count_, TTAMachine::Machine::functionUnitNavigator(), TTAMachine::FunctionUnit::hasOperation(), isAllowedUnit(), TTAMachine::Machine::Navigator< ComponentType >::item(), Operation::name(), and ProgramOperation::operation().
Referenced by addCandidateSetAnnotations(), and addMinimumRegisterCopies().
void RegisterCopyAdder::resultsScheduled | ( | AddedRegisterCopies & | copies, |
DataDependenceGraph & | ddg | ||
) |
Called after all results of a move are scheduled. This creates the dependence edges between them.
copies | information about all regcopies of the po |
ddg | ddg to update |
Definition at line 2108 of file RegisterCopyAdder.cc.
References assert, DataDependenceGraph::createRegisterAntiDependenciesBetweenNodes(), MoveNode::isScheduled(), and RegisterCopyAdder::AddedRegisterCopies::resultCopies_.
Referenced by BasicBlockScheduler::scheduleOperation(), and BUBasicBlockScheduler::scheduleOperation().
|
private |
Indicate that register copy adder is called from bottom up scheduler, this causes search for first scheduled register write instead of last read.
Definition at line 246 of file RegisterCopyAdder.hh.
Referenced by addConnectionRegisterCopies(), fixDDGEdgesInTempRegChain(), and fixDDGEdgesInTempRegChainImmediate().
|
private |
the inter pass data from which to fetch the scratch register list
Definition at line 238 of file RegisterCopyAdder.hh.
Referenced by addConnectionRegisterCopies(), and addConnectionRegisterCopiesImmediate().
|
private |
the resource manager to check for machine resources in heuristics
Definition at line 242 of file RegisterCopyAdder.hh.
Referenced by addConnectionRegisterCopies().