OpenASIP
2.0
|
#include <ProgramOperation.hh>
Classes | |
class | Comparator |
Static Public Member Functions | |
static int | outputIndexFromGuard (const TTAMachine::PortGuard &pg, const Operation &op) |
Private Types | |
typedef std::vector< MoveNode * > | MoveVector |
Private Member Functions | |
ProgramOperation (const ProgramOperation &) | |
ProgramOperation & | operator= (const ProgramOperation &) |
Private Attributes | |
const Operation * | operation_ |
std::map< int, MoveNodeSet * > | inputMoves_ |
std::map< int, MoveNodeSet * > | outputMoves_ |
MoveVector | allInputMoves_ |
MoveVector | allOutputMoves_ |
unsigned int | poId_ |
const llvm::MachineInstr * | mInstr_ |
Static Private Attributes | |
static unsigned int | idCounter = 0 |
Represents a single execution of an operation in a program.
Definition at line 70 of file ProgramOperation.hh.
|
private |
Definition at line 158 of file ProgramOperation.hh.
ProgramOperation::ProgramOperation | ( | const Operation & | operation, |
const llvm::MachineInstr * | instr = NULL |
||
) |
Constructor.
Creates a ProgramOperation from operation
operation | Operation |
Definition at line 67 of file ProgramOperation.cc.
ProgramOperation::ProgramOperation | ( | ) |
TODO: this better go, just for testing with empty operation...
Constructor.
Creates a ProgramOperation from NullOperation
Definition at line 79 of file ProgramOperation.cc.
References inputMoves_, and outputMoves_.
ProgramOperation::~ProgramOperation | ( | ) |
Destructor.
Deletes MoveNodeSets. Does not unregister these program operations from movenodes.
Definition at line 90 of file ProgramOperation.cc.
References AssocTools::deleteAllValues(), inputMove(), inputMoveCount(), inputMoves_, outputMove(), outputMoveCount(), outputMoves_, MoveNode::removeDestinationOperation(), MoveNode::sourceOperation(), MoveNode::unsetGuardOperation(), and MoveNode::unsetSourceOperation().
|
private |
void ProgramOperation::addGuardOutputNode | ( | MoveNode & | node | ) |
Add given node to the set of nodes that belong to this program operation.
Add node to nodes of program operation
node | MoveNode to add to operation |
Definition at line 201 of file ProgramOperation.cc.
References addOutputNode(), and outputIndexFromGuardOfMove().
Referenced by MoveNodeDuplicator::duplicateMoveNode().
void ProgramOperation::addInputNode | ( | MoveNode & | node | ) |
Add given node to the set of input nodes that belong to this program operation.
Input node is a move that writes an operand of the operation.
node | MoveNode to add to operation |
Definition at line 144 of file ProgramOperation.cc.
References MoveNodeSet::addMoveNode(), allInputMoves_, MapTools::containsKey(), TTAProgram::Move::destination(), inputMoves_, MoveNode::move(), and TTAProgram::Terminal::operationIndex().
Referenced by addNode(), MoveNode::copy(), and MoveNodeDuplicator::duplicateMoveNode().
void ProgramOperation::addNode | ( | MoveNode & | node | ) |
Add given node to the set of nodes that belong to this program operation.
Warning: this should not be used with bypassed moves!
Add node to nodes of program operation
node | MoveNode to add to operation |
Definition at line 119 of file ProgramOperation.cc.
References addInputNode(), addOutputNode(), TTAProgram::Move::destination(), TTAProgram::Terminal::hintOperation(), TTAProgram::Terminal::isFUPort(), MoveNode::move(), Operation::name(), NullOperation::name(), operation(), and TTAProgram::Move::source().
void ProgramOperation::addOutputNode | ( | MoveNode & | node | ) |
Add given node to the set of nodes that belong to this program operation.
Add node to nodes of program operation
node | MoveNode to add to operation |
Definition at line 188 of file ProgramOperation.cc.
References addOutputNode(), MoveNode::move(), TTAProgram::Terminal::operationIndex(), and TTAProgram::Move::source().
void ProgramOperation::addOutputNode | ( | MoveNode & | node, |
int | outputIndex | ||
) |
Add given node to the set of nodes that belong to this program operation.
Add node to nodes of program operation
node | MoveNode to add to operation |
outputIndex | output index of the operation. |
Definition at line 167 of file ProgramOperation.cc.
References MoveNodeSet::addMoveNode(), allOutputMoves_, MapTools::containsKey(), and outputMoves_.
Referenced by addGuardOutputNode(), addNode(), addOutputNode(), MoveNode::copy(), and MoveNodeDuplicator::duplicateMoveNode().
bool ProgramOperation::areInputsAssigned | ( | ) |
Return true if nodes of this operation have function unit assigned to their source or destination respectively
Definition at line 435 of file ProgramOperation.cc.
References inputMove(), inputMoveCount(), and MoveNode::isAssigned().
Referenced by CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp().
bool ProgramOperation::areOutputsAssigned | ( | ) |
Return true if nodes of this operation have function unit assigned to their source or destination respectively
Definition at line 467 of file ProgramOperation.cc.
References MoveNode::isAssigned(), outputMove(), and outputMoveCount().
MoveNode * ProgramOperation::findTriggerFromUnit | ( | const TTAMachine::Unit & | unit | ) | const |
Definition at line 677 of file ProgramOperation.cc.
References assert, inputMoves_, TTAMachine::HWOperation::io(), TTAMachine::FUPort::isTriggering(), Operation::name(), TTAMachine::FunctionUnit::operation(), operation(), TTAMachine::FunctionUnit::port(), and TTAMachine::Unit::portCount().
Referenced by ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), and triggeringMove().
const TTAMachine::FunctionUnit * ProgramOperation::fuFromOutMove | ( | const MoveNode & | outputNode | ) | const |
Definition at line 844 of file ProgramOperation.cc.
References assert, outputNode(), TTAMachine::BaseFUPort::parentUnit(), and TTAMachine::PortGuard::port().
Referenced by ExecutionPipelineBroker::earliestFromDestination(), OutputFUBroker::isAlreadyAssigned(), ExecutionPipelineBroker::latestFromSource(), ExecutionPipelineResource::latestTriggerWriteCycle(), scheduledFU(), triggeringMove(), and OutputFUBroker::unassign().
bool ProgramOperation::hasConstantOperand | ( | ) | const |
Returns true in case the operation has at least one operand that is a contant/immediate.
Definition at line 831 of file ProgramOperation.cc.
References allInputMoves_, and MoveNode::isSourceConstant().
bool ProgramOperation::hasInputNode | ( | int | index | ) | const |
Return true if program operation has node registered for input identified by index.
Index | Operation input to test |
Definition at line 560 of file ProgramOperation.cc.
References MapTools::containsKey(), and inputMoves_.
bool ProgramOperation::hasMoveNodeForMove | ( | const TTAProgram::Move & | move | ) | const |
Definition at line 723 of file ProgramOperation.cc.
References allInputMoves_, allOutputMoves_, MoveNode::move(), and moveNode().
bool ProgramOperation::hasOutputNode | ( | int | index | ) | const |
Return true if program operation has node registered for output identified by index.
Index | Operation output to test |
Definition at line 576 of file ProgramOperation.cc.
References MapTools::containsKey(), and outputMoves_.
const TTAMachine::HWOperation * ProgramOperation::hwopFromOutMove | ( | const MoveNode & | outputNode | ) | const |
Definition at line 895 of file ProgramOperation.cc.
References assert, Operation::name(), NullOperation::name(), TTAMachine::FunctionUnit::operation(), operation(), outputNode(), TTAMachine::Port::parentUnit(), and TTAMachine::PortGuard::port().
Referenced by BF2ScheduleFront::prefResultCycle().
MoveNode & ProgramOperation::inputMove | ( | int | index | ) | const |
Returns the given input move.
index | Index of the move. |
Definition at line 621 of file ProgramOperation.cc.
References allInputMoves_.
Referenced by RegisterCopyAdder::addCandidateSetAnnotations(), RegisterCopyAdder::addRegisterCopies(), InputFUBroker::allAvailableResources(), ResourceConstraintAnalyzer::analyzeMoveNode(), annotateAllInputs(), areInputsAssigned(), BFEarlyBypasser::bypassSourceLatestCycle(), DataDependenceGraphBuilder::checkAndCreateMemDep(), ExecutionPipelineResource::checkOperandAllowed(), DataDependenceGraph::dotString(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), BF2ScheduleFront::findInducingBypassSourceFromOperation(), MachineConnectivityCheck::findPossibleDestinationPorts(), BF2Scheduler::getDstUnit(), BFOptimization::immCountPreventsScheduling(), RegisterCopyAdder::isAllowedUnit(), isAnyInputAssigned(), isAnyNodeAssigned(), isAssigned(), MoveNode::isLastUnscheduledMoveOfDstOp(), isLegalFU(), ExecutionPipelineBroker::isMoveTrigger(), DataDependenceGraph::latestCycle(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), DataDependenceGraphBuilder::memoryCategory(), CriticalPathBBMoveNodeSelector::mightBeReady(), DataDependenceGraph::moveFUDependenciesToTrigger(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::operandsOverwritten(), BFLateBypassGuard::operator()(), BFPushMoveUp::operator()(), BFPushMoveUp2::operator()(), ResourceConstraintAnalyzer::optimalScheduleResourceUsage(), ExecutionPipelineResource::poConflictsWithInputPort(), BUMoveNodeSelector::queueOperation(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), BFOptimization::RFReadPortCountPreventsScheduling(), scheduledFU(), BUBasicBlockScheduler::scheduleOperation(), setOperation(), switchInputs(), ExecutionPipelineResource::triggerTooEarly(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), PreOptimizer::tryToOptimizeAddressReg(), PreOptimizer::tryToPrecalcConstantAdd(), PreOptimizer::tryToRemoveEq(), PreOptimizer::tryToRemoveGuardInversingOp(), PreOptimizer::tryToRemoveXor(), BUBasicBlockScheduler::tryToSwitchInputs(), BasicBlockScheduler::tryToSwitchInputs(), DataDependenceGraph::writeToXMLFile(), and ~ProgramOperation().
int ProgramOperation::inputMoveCount | ( | ) | const |
Count of input moves to this operation.
Definition at line 600 of file ProgramOperation.cc.
References allInputMoves_.
Referenced by RegisterCopyAdder::addCandidateSetAnnotations(), RegisterCopyAdder::addRegisterCopies(), InputFUBroker::allAvailableResources(), ResourceConstraintAnalyzer::analyzeMoveNode(), annotateAllInputs(), areInputsAssigned(), BFEarlyBypasser::bypassSourceLatestCycle(), DataDependenceGraphBuilder::checkAndCreateMemDep(), ExecutionPipelineResource::checkOperandAllowed(), DataDependenceGraph::dotString(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), BF2ScheduleFront::findInducingBypassSourceFromOperation(), MachineConnectivityCheck::findPossibleDestinationPorts(), BF2Scheduler::getDstUnit(), BFOptimization::immCountPreventsScheduling(), RegisterCopyAdder::isAllowedUnit(), isAnyInputAssigned(), isAnyNodeAssigned(), isAssigned(), MoveNode::isLastUnscheduledMoveOfDstOp(), isLegalFU(), ExecutionPipelineBroker::isMoveTrigger(), DataDependenceGraph::latestCycle(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), DataDependenceGraphBuilder::memoryCategory(), CriticalPathBBMoveNodeSelector::mightBeReady(), DataDependenceGraph::moveFUDependenciesToTrigger(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::operandsOverwritten(), BFLateBypassGuard::operator()(), BFPushMoveUp::operator()(), BFPushMoveUp2::operator()(), ExecutionPipelineResource::poConflictsWithInputPort(), BUMoveNodeSelector::queueOperation(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), BFOptimization::RFReadPortCountPreventsScheduling(), scheduledFU(), SequentialScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperation(), setOperation(), switchInputs(), ExecutionPipelineResource::triggerTooEarly(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), PreOptimizer::tryToOptimizeAddressReg(), PreOptimizer::tryToPrecalcConstantAdd(), PreOptimizer::tryToRemoveEq(), PreOptimizer::tryToRemoveXor(), BUBasicBlockScheduler::tryToSwitchInputs(), BasicBlockScheduler::tryToSwitchInputs(), DataDependenceGraph::writeToXMLFile(), and ~ProgramOperation().
MoveNodeSet & ProgramOperation::inputNode | ( | int | index | ) | const |
Return the nodes that writes input Index of operation
index | Index of a operation to test |
OutOfRange | In case the index is higher then number of operation inputs |
Definition at line 513 of file ProgramOperation.cc.
References __func__, inputMoves_, Operation::numberOfInputs(), and operation_.
Referenced by MemoryAliasAnalyzer::addressOperandMove(), LoopAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), BF2Scheduler::countLoopInvariantValueUsages(), MemoryAliasAnalyzer::detectConstantScale(), LoopAnalyzer::findEndCond(), MemoryAliasAnalyzer::findIncrement(), LoopAnalyzer::findInitAndUpdate(), DataDependenceGraph::findLoopIndexUpdate(), DataDependenceGraph::findLoopLimitAndIndex(), BasicBlockScheduler::findTriggerFromUnit(), StackAliasAnalyzer::getStackOffset(), OffsetAliasAnalyzer::isAddressTraceable(), ExecutionPipelineResource::nodeOfInputPort(), BF2Scheduler::reservePreallocatedFUs(), scheduledFU(), MemoryAliasAnalyzer::searchLoopIndexBasedIncrement(), and LoopAnalyzer::tryTrackCommonAncestor().
bool ProgramOperation::isAnyInputAssigned | ( | ) |
Return true if any node of this operation have function unit assigned to their source or destination respectively
Definition at line 419 of file ProgramOperation.cc.
References inputMove(), inputMoveCount(), and MoveNode::isAssigned().
bool ProgramOperation::isAnyNodeAssigned | ( | ) |
Return true if any node of this operation have function unit assigned to their source or destination respectively
Definition at line 398 of file ProgramOperation.cc.
References inputMove(), inputMoveCount(), MoveNode::isAssigned(), outputMove(), and outputMoveCount().
Referenced by MachineConnectivityCheck::findPossibleDestinationPorts().
bool ProgramOperation::isAnyOutputAssigned | ( | ) |
Return true if any output node of this operation have function unit assigned to their source or destination respectively
Definition at line 451 of file ProgramOperation.cc.
References MoveNode::isAssigned(), outputMove(), and outputMoveCount().
Referenced by BUBasicBlockScheduler::scheduleMove().
bool ProgramOperation::isAssigned | ( | ) |
Return true if nodes of this operation have function unit assigned to their source or destination respectively
Definition at line 377 of file ProgramOperation.cc.
References inputMove(), inputMoveCount(), MoveNode::isAssigned(), outputMove(), and outputMoveCount().
bool ProgramOperation::isComplete | ( | ) |
Return true if each input and each output of the operation has a corresponding node reference in this program operation
Definition at line 315 of file ProgramOperation.cc.
References MapTools::containsKey(), isReady(), Operation::numberOfInputs(), Operation::numberOfOutputs(), operation_, and outputMoves_.
bool ProgramOperation::isLegalFU | ( | const TTAMachine::FunctionUnit & | fu | ) | const |
Definition at line 915 of file ProgramOperation.cc.
References TTAProgram::ProgramAnnotation::ANN_REJECTED_UNIT_DST, TTAProgram::ProgramAnnotation::ANN_REJECTED_UNIT_SRC, TTAProgram::AnnotatedInstructionElement::hasAnnotation(), TTAMachine::FunctionUnit::hasOperation(), inputMove(), inputMoveCount(), MoveNode::move(), TTAMachine::Component::name(), Operation::name(), operation_, outputMove(), and outputMoveCount().
Referenced by FUBroker::findFUOfPO(), and BFLateBypassGuard::operator()().
bool ProgramOperation::isMultinode | ( | ) |
Return true if this program operation has more then one reference for some input or output of the operation.
Definition at line 352 of file ProgramOperation.cc.
References inputMoves_, and outputMoves_.
bool ProgramOperation::isReady | ( | ) |
Return true if each input node has corresponding node reference
Definition at line 336 of file ProgramOperation.cc.
References MapTools::containsKey(), inputMoves_, Operation::numberOfInputs(), and operation_.
Referenced by isComplete().
|
inline |
Definition at line 136 of file ProgramOperation.hh.
References mInstr_.
Referenced by LLVMAliasAnalyzer::analyze(), DataDependenceGraphBuilder::checkAndCreateMemDep(), and LLVMAliasAnalyzer::isAddressTraceable().
MoveNode & ProgramOperation::moveNode | ( | const TTAProgram::Move & | move | ) | const |
Definition at line 706 of file ProgramOperation.cc.
References __func__, allInputMoves_, allOutputMoves_, and MoveNode::move().
Referenced by hasMoveNodeForMove(), and triggeringMove().
MoveNode & ProgramOperation::opcodeSettingNode | ( | ) |
Return the MoveNode of program operation that sets the opcode and triggers operation execution.
Such a MoveNode is usually one of input nodes and can not have multiple copies.
InvalidData | In case there is no opcode setting node register in operation |
Definition at line 487 of file ProgramOperation.cc.
References __func__, and inputMoves_.
Referenced by ResourceConstraintAnalyzer::analyzeMoveNode().
const Operation & ProgramOperation::operation | ( | ) | const |
Return the operation from OSAL
Definition at line 590 of file ProgramOperation.cc.
References operation_.
Referenced by addNode(), MemoryAliasAnalyzer::addressOperandMove(), OutputFUBroker::allAvailableResources(), LoopAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), OutputFUBroker::assign(), BusResource::canAssign(), ExecutionPipelineResource::canAssignDestination(), ExecutionPipelineResource::canAssignSource(), BFOptimization::canBeSpeculated(), PreOptimizer::checkGuardReversalAllowed(), CopyingDelaySlotFiller::collectMoves(), MemoryAliasAnalyzer::compareIndeces(), BF2Scheduler::countLoopInvariantValueUsages(), MemoryAliasAnalyzer::detectConstantScale(), ResourceConstraintAnalyzer::dumpGraphWithStats(), MoveNodeDuplicator::duplicateMove(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), MoveNode::earliestResultReadCycle(), LoopAnalyzer::findEndCond(), MemoryAliasAnalyzer::findIncrement(), LoopAnalyzer::findInitAndUpdate(), DataDependenceGraph::findLoopIndexUpdate(), DataDependenceGraph::findLoopLimitAndIndex(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), BasicBlockScheduler::findTrigger(), findTriggerFromUnit(), BasicBlockScheduler::findTriggerFromUnit(), MemoryAliasAnalyzer::findTwoPartAddressOperands(), CopyingDelaySlotFiller::getMove(), PreOptimizer::handleCFGDDG(), hwopFromOutMove(), BFOptimization::immCountPreventsScheduling(), OffsetAliasAnalyzer::isAddressTraceable(), ExecutionPipelineBroker::isMoveTrigger(), BF2Scheduler::isTrigger(), DataDependenceGraphBuilder::isTriggering(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), MoveNode::latestTriggerWriteCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), BF2Scheduler::mustBeTrigger(), ExecutionPipelineResource::nodeOfInputPort(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandPort(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), ExecutionPipelineResource::operandTooLate(), BFRemoveLoopChecksAndJump::operator()(), BFLateBypassGuard::operator()(), BFShareOperands::operator()(), outputIndexFromGuard(), ExecutionPipelineResource::poConflictsWithInputPort(), RegisterCopyAdder::requiredRegisterCopiesForEachFU(), BF2Scheduler::reservePreallocatedFUs(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), ExecutionPipelineResource::resultReadyCycle(), BFOptimization::RFReadPortCountPreventsScheduling(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), MemoryAliasAnalyzer::searchLoopIndexBasedIncrement(), ExecutionPipelineResource::setOperandsUsed(), ExecutionPipelineResource::setResultWriten(), switchInputs(), ExecutionPipelineResource::testTriggerResult(), ExecutionPipelineResource::triggerTooEarly(), PreOptimizer::tryToPrecalcConstantAdd(), PreOptimizer::tryToRemoveEq(), BUBasicBlockScheduler::tryToSwitchInputs(), BasicBlockScheduler::tryToSwitchInputs(), LoopAnalyzer::tryTrackCommonAncestor(), ExecutionPipelineResource::unsetOperandsUsed(), and ExecutionPipelineResource::unsetResultWriten().
|
private |
|
inline |
Definition at line 147 of file ProgramOperation.hh.
References poId().
int ProgramOperation::outputIndexFromGuard | ( | const TTAMachine::PortGuard & | pg | ) | const |
Definition at line 266 of file ProgramOperation.cc.
References operation().
Referenced by BFLateBypassGuard::operator()(), and outputIndexFromGuardOfMove().
|
static |
Definition at line 271 of file ProgramOperation.cc.
References TTAMachine::HWOperation::io(), Operation::name(), TTAMachine::FunctionUnit::operation(), TTAMachine::Port::parentUnit(), and TTAMachine::PortGuard::port().
int ProgramOperation::outputIndexFromGuardOfMove | ( | const MoveNode & | node | ) | const |
Definition at line 256 of file ProgramOperation.cc.
References assert, TTAProgram::MoveGuard::guard(), TTAProgram::Move::guard(), TTAProgram::Move::isUnconditional(), MoveNode::move(), and outputIndexFromGuard().
Referenced by addGuardOutputNode(), OutputFUBroker::allAvailableResources(), ExecutionPipelineResource::canAssignSource(), ExecutionPipelineBroker::latestFromDestination(), outputIndexOfMove(), removeGuardOutputNode(), and ExecutionPipelineResource::testTriggerResult().
int ProgramOperation::outputIndexOfMove | ( | const MoveNode & | mn | ) | const |
Definition at line 886 of file ProgramOperation.cc.
References MoveNode::isSourceOperation(), MoveNode::move(), TTAProgram::Terminal::operationIndex(), outputIndexFromGuardOfMove(), TTAProgram::Move::source(), and MoveNode::sourceOperation().
Referenced by OutputFUBroker::assign(), ExecutionPipelineBroker::earliestFromDestination(), MoveNode::earliestResultReadCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), BF2ScheduleFront::prefResultCycle(), and ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing().
MoveNode & ProgramOperation::outputMove | ( | int | index | ) | const |
Returns the given output move.
index | Index of the move. |
Definition at line 632 of file ProgramOperation.cc.
References allOutputMoves_.
Referenced by RegisterCopyAdder::addCandidateSetAnnotations(), RegisterCopyAdder::addRegisterCopies(), annotateAllOutputs(), areOutputsAssigned(), BFEarlyBypasser::bypassSourceLatestCycle(), DataDependenceGraph::dotString(), DataDependenceGraph::earliestCycle(), ExecutionPipelineBroker::earliestFromDestination(), BF2ScheduleFront::findInducingBypassSourceFromOperation(), MachineConnectivityCheck::findPossibleDestinationPorts(), RegisterCopyAdder::isAllowedUnit(), isAnyNodeAssigned(), isAnyOutputAssigned(), isAssigned(), isLegalFU(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), MoveNode::latestTriggerWriteCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), CriticalPathBBMoveNodeSelector::mightBeReady(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), BFLateBypassGuard::operator()(), BFRescheduleResultsClose::operator()(), BFPushMoveUp2::operator()(), BF2ScheduleFront::prefResultCycle(), BUMoveNodeSelector::queueOperation(), scheduledFU(), BUBasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperation(), setOperation(), ExecutionPipelineResource::testTriggerResult(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), PreOptimizer::tryToOptimizeAddressReg(), PreOptimizer::tryToPrecalcConstantAdd(), PreOptimizer::tryToRemoveGuardInversingOp(), and ~ProgramOperation().
int ProgramOperation::outputMoveCount | ( | ) | const |
Count of output moves to this operation.
Definition at line 610 of file ProgramOperation.cc.
References allOutputMoves_.
Referenced by RegisterCopyAdder::addCandidateSetAnnotations(), RegisterCopyAdder::addRegisterCopies(), annotateAllOutputs(), areOutputsAssigned(), BFEarlyBypasser::bypassSourceLatestCycle(), DataDependenceGraph::dotString(), DataDependenceGraph::earliestCycle(), ExecutionPipelineBroker::earliestFromDestination(), BF2ScheduleFront::findInducingBypassSourceFromOperation(), MachineConnectivityCheck::findPossibleDestinationPorts(), RegisterCopyAdder::isAllowedUnit(), isAnyNodeAssigned(), isAnyOutputAssigned(), isAssigned(), isLegalFU(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), MoveNode::latestTriggerWriteCycle(), ExecutionPipelineResource::latestTriggerWriteCycle(), CriticalPathBBMoveNodeSelector::mightBeReady(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), BFLateBypassGuard::operator()(), BFRescheduleResultsClose::operator()(), BFPushMoveUp2::operator()(), BF2ScheduleFront::prefResultCycle(), BUMoveNodeSelector::queueOperation(), scheduledFU(), BUBasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleOperation(), setOperation(), ExecutionPipelineResource::testTriggerResult(), CopyingDelaySlotFiller::tryToAssignOtherMovesOfOp(), PreOptimizer::tryToOptimizeAddressReg(), PreOptimizer::tryToRemoveEq(), PreOptimizer::tryToRemoveXor(), and ~ProgramOperation().
MoveNodeSet & ProgramOperation::outputNode | ( | int | index | ) | const |
Return the nodes that writes output Index of operation
index | Index of a operation to test |
OutOfRange | If index is not found |
Definition at line 535 of file ProgramOperation.cc.
References __func__, MapTools::containsKey(), Operation::numberOfInputs(), NullOperation::numberOfInputs(), Operation::numberOfOutputs(), operation_, and outputMoves_.
Referenced by ExecutionPipelineResource::canAssignSource(), fuFromOutMove(), hwopFromOutMove(), and scheduledFU().
unsigned int ProgramOperation::poId | ( | ) | const |
Returns an unique id of this program operation.
These can be used instead of pointers for comparison, and are more deterministic as they are given in order.
Definition at line 765 of file ProgramOperation.cc.
References poId_.
Referenced by OffsetAliasAnalyzer::analyze(), StackAliasAnalyzer::analyze(), MoveNode::dotString(), DataDependenceGraph::dotString(), StackAliasAnalyzer::isAddressTraceable(), OffsetAliasAnalyzer::isAddressTraceable(), ProgramOperation::Comparator::operator()(), operator==(), and toString().
void ProgramOperation::removeGuardOutputNode | ( | MoveNode & | node | ) |
Removes output node from set of nodes that belong to this program operation.
node | MoveNode being removed from this program operation |
Definition at line 249 of file ProgramOperation.cc.
References outputIndexFromGuardOfMove(), and removeOutputNode().
Referenced by DataDependenceGraph::guardRestored(), and MoveNode::~MoveNode().
void ProgramOperation::removeInputNode | ( | MoveNode & | node | ) |
Removes output node from set of nodes that belong to this program operation.
node | MoveNode being removed from this program operation |
Definition at line 289 of file ProgramOperation.cc.
References __func__, allInputMoves_, MapTools::containsKey(), TTAProgram::Move::destination(), inputMoves_, MoveNode::move(), TTAProgram::Terminal::operationIndex(), and MoveNodeSet::removeMoveNode().
Referenced by DataDependenceGraph::removeNode(), and MoveNode::~MoveNode().
void ProgramOperation::removeOutputNode | ( | MoveNode & | node | ) |
Removes output node from set of nodes that belong to this program operation.
node | MoveNode being removed from this program operation |
Definition at line 238 of file ProgramOperation.cc.
References MoveNode::move(), TTAProgram::Terminal::operationIndex(), removeOutputNode(), and TTAProgram::Move::source().
void ProgramOperation::removeOutputNode | ( | MoveNode & | node, |
int | outputIndex | ||
) |
Removes output node from set of nodes that belong to this program operation.
node | MoveNode being removed from this program operation |
outputIndex | the output index. |
Definition at line 214 of file ProgramOperation.cc.
References __func__, allOutputMoves_, MapTools::containsKey(), outputMoves_, and MoveNodeSet::removeMoveNode().
Referenced by removeGuardOutputNode(), DataDependenceGraph::removeNode(), removeOutputNode(), PreOptimizer::tryToPrecalcConstantAdd(), BFUpdateMoveOnBypass::undoOnlyMe(), DataDependenceGraph::unMergeUser(), and MoveNode::~MoveNode().
const TTAMachine::FunctionUnit * ProgramOperation::scheduledFU | ( | ) | const |
Definition at line 866 of file ProgramOperation.cc.
References fuFromOutMove(), inputMove(), inputMoveCount(), inputNode(), outputMove(), outputMoveCount(), and outputNode().
Referenced by MachineConnectivityCheck::busConnectedToAnyFU(), FUBroker::findFUOfPO(), and BFShareOperands::operator()().
void ProgramOperation::setOperation | ( | const Operation & | op | ) |
Definition at line 941 of file ProgramOperation.cc.
References assert, TTAProgram::Move::destination(), inputMove(), inputMoveCount(), MoveNode::move(), Operation::name(), operation_, outputMove(), outputMoveCount(), TTAProgram::TerminalFUPort::setHintOperation(), and TTAProgram::Move::source().
Referenced by Peel2BBLoops::appendBB().
void ProgramOperation::switchInputs | ( | int | idx1 = 1 , |
int | idx2 = 2 |
||
) |
Switches inputs of 2-operand commutative operations
Definition at line 795 of file ProgramOperation.cc.
References assert, TTAProgram::Move::destination(), inputMove(), inputMoveCount(), inputMoves_, MoveNode::move(), Operation::numberOfInputs(), operation(), TTAProgram::Terminal::operationIndex(), and TTAProgram::Move::setDestination().
Referenced by PreOptimizer::inverseGuardsOfHeads(), BUBasicBlockScheduler::tryToSwitchInputs(), and BasicBlockScheduler::tryToSwitchInputs().
std::string ProgramOperation::toString | ( | ) | const |
The moves of the program operation in human readable format.
Definition at line 746 of file ProgramOperation.cc.
References allInputMoves_, allOutputMoves_, NullOperation::output(), poId(), and Conversion::toString().
Referenced by RegisterCopyAdder::addMinimumRegisterCopies(), BF2Scheduler::allocateFunctionUnits(), LoopAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), BFOptimization::assign(), BFOptimization::assignCopyToPrologEpilog(), ExecutionPipelineResource::assignDestination(), MoveNodeGroupBuilder::build(), BFOptimization::canAssign(), ExecutionPipelineResource::canAssignDestination(), DataDependenceGraphBuilder::checkAndCreateMemDep(), ExecutionPipelineResource::checkOperandAllowed(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandsOverwritten(), BFLateBypassGuard::operator()(), BF2Scheduler::preAllocateFunctionUnits(), ExecutionPipelineResource::resultAllowedAtCycle(), ExecutionPipelineResource::resultReadyCycle(), BFUnscheduleMove::returnOriginal(), BFUnscheduleFromBody::returnOriginal(), BFShareOperandLate::revert(), ExecutionPipelineResource::triggerTooEarly(), BFLateBypass::undoOnlyMe(), BFUnscheduleFromBody::unscheduleOriginal(), and BFUnscheduleMove::unscheduleOriginal().
MoveNode * ProgramOperation::triggeringMove | ( | ) | const |
Returns the triggering move of the operation.
Definition at line 643 of file ProgramOperation.cc.
References allInputMoves_, allOutputMoves_, TTAProgram::Move::destination(), findTriggerFromUnit(), fuFromOutMove(), TTAProgram::Terminal::isFUPort(), TTAMachine::BaseFUPort::isTriggering(), MoveNode::move(), moveNode(), TTAMachine::BaseFUPort::parentUnit(), and TTAProgram::Terminal::port().
Referenced by CopyingDelaySlotFiller::allowedToSpeculate(), ResourceConstraintAnalyzer::analyzeMoveNode(), ExecutionPipelineResource::canAssignSource(), DataDependenceGraph::earliestCycle(), MoveNode::earliestResultReadCycle(), BasicBlockScheduler::findTrigger(), ExecutionPipelineResource::hasConflictingResultsOnCycle(), ExecutionPipelineResource::nextResultCycle(), ExecutionPipelineResource::operandAllowedAtCycle(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), ExecutionPipelineResource::operandTooLate(), BFPushMoveUp2::operator()(), BFShareOperandLate::operator()(), ExecutionPipelineResource::otherTriggerBeforeMyTrigger(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), and ExecutionPipelineResource::resultReadyCycle().
|
private |
Definition at line 170 of file ProgramOperation.hh.
Referenced by addInputNode(), hasConstantOperand(), hasMoveNodeForMove(), inputMove(), inputMoveCount(), moveNode(), removeInputNode(), toString(), and triggeringMove().
|
private |
Definition at line 172 of file ProgramOperation.hh.
Referenced by addOutputNode(), hasMoveNodeForMove(), moveNode(), outputMove(), outputMoveCount(), removeOutputNode(), toString(), and triggeringMove().
|
staticprivate |
Definition at line 174 of file ProgramOperation.hh.
|
private |
Definition at line 166 of file ProgramOperation.hh.
Referenced by addInputNode(), findTriggerFromUnit(), hasInputNode(), inputNode(), isMultinode(), isReady(), opcodeSettingNode(), ProgramOperation(), removeInputNode(), switchInputs(), and ~ProgramOperation().
|
private |
Definition at line 176 of file ProgramOperation.hh.
Referenced by machineInstr().
|
private |
Definition at line 164 of file ProgramOperation.hh.
Referenced by inputNode(), isComplete(), isLegalFU(), isReady(), operation(), outputNode(), and setOperation().
|
private |
Definition at line 168 of file ProgramOperation.hh.
Referenced by addOutputNode(), hasOutputNode(), isComplete(), isMultinode(), outputNode(), ProgramOperation(), removeOutputNode(), and ~ProgramOperation().
|
private |
Definition at line 173 of file ProgramOperation.hh.
Referenced by poId().