OpenASIP
2.0
|
#include <Terminal.hh>
Public Member Functions | |
Terminal () | |
virtual | ~Terminal () |
virtual bool | isImmediate () const |
virtual bool | isAddress () const |
virtual bool | isInstructionAddress () const |
virtual bool | isImmediateRegister () const |
virtual bool | isGPR () const |
virtual bool | isFUPort () const |
virtual bool | isRA () const |
virtual bool | isBasicBlockReference () const |
virtual bool | isProgramOperationReference () const |
virtual bool | isCodeSymbolReference () const |
virtual bool | isUniversalMachineRegister () const |
virtual SimValue | value () const |
virtual Address | address () const |
virtual const InstructionReference & | instructionReference () const |
virtual InstructionReference & | instructionReference () |
virtual const TTAMachine::RegisterFile & | registerFile () const |
virtual const TTAMachine::ImmediateUnit & | immediateUnit () const |
virtual const TTAMachine::FunctionUnit & | functionUnit () const |
virtual const BasicBlock & | basicBlock () const |
virtual int | index () const |
virtual bool | isOpcodeSetting () const |
virtual bool | isTriggering () const |
virtual Operation & | operation () const |
virtual Operation & | hintOperation () const |
virtual int | operationIndex () const |
virtual const TTAMachine::Port & | port () const |
virtual void | setIndex (int index) |
virtual void | setInstructionReference (InstructionReference ref) |
virtual Terminal * | copy () const =0 |
bool | operator== (const Terminal &other) const |
virtual bool | equals (const Terminal &other) const =0 |
virtual TCEString | toString () const =0 |
Models any possible source or destination of a move.
Definition at line 60 of file Terminal.hh.
TTAProgram::Terminal::Terminal | ( | ) |
|
virtual |
|
virtual |
Returns the address held by this terminal.
WrongSubclass | if the terminal is not an instance of TerminalAddress. |
Reimplemented in TTAProgram::TerminalInstructionAddress, TTAProgram::TerminalProgramOperation, TTAProgram::TerminalAddress, and TTAProgram::TerminalInstructionReference.
Definition at line 210 of file Terminal.cc.
Referenced by TTAProgram::TPEFProgramFactory::build(), TTAProgram::ProgramWriter::createCodeSection(), TTAProgram::TPEFProgramFactory::createInstruction(), and TTAProgram::TerminalAddress::equals().
|
virtual |
Returns a reference to the basic block to which the immediate points.
Reimplemented in TTAProgram::TerminalBasicBlockReference.
Definition at line 261 of file Terminal.cc.
Referenced by ControlFlowGraph::buildMBBFromBB(), ControlFlowGraph::convertBBRefsToInstRefs(), and ControlFlowGraph::jumpToBBN().
|
pure virtual |
Implemented in TTAProgram::TerminalInstructionAddress, TTAProgram::TerminalFUPort, TTAProgram::TerminalProgramOperation, TTAProgram::TerminalRegister, TTAProgram::TerminalInstructionReference, TTAProgram::TerminalAddress, TTAProgram::TerminalLaneIDImmediate, TTAProgram::TerminalImmediate, TTAProgram::TerminalBasicBlockReference, and TTAProgram::TerminalSymbolReference.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), IUBroker::allAvailableResources(), IUResource::assign(), ITemplateBroker::assign(), SimpleBrokerDirector::assign(), IUBroker::assign(), SimpleBrokerDirector::canAssign(), TTAProgram::Immediate::copy(), TTAProgram::Move::copy(), TTAProgram::CodeGenerator::createForLoopBufferInit(), TTAProgram::TPEFProgramFactory::createTerminal(), CallsToJumps::handleControlFlowGraph(), DataDependenceGraph::mergeAndKeepSource(), DataDependenceGraph::mergeAndKeepUser(), BFRenameLiveRange::renameLiveRange(), PreOptimizer::tryToOptimizeAddressReg(), PreOptimizer::tryToRemoveGuardInversingOp(), BFUpdateMoveOnBypass::undoOnlyMe(), BFRenameLiveRange::undoSetTerminal(), BFCopyRegWithOp::undoSplit(), BFRegCopyAfter::undoSplit(), BFRegCopyBefore::undoSplit(), DataDependenceGraph::unMergeUser(), and CopyingDelaySlotFiller::updateJumpsAndCfg().
|
pure virtual |
Implemented in TTAProgram::TerminalInstructionAddress, TTAProgram::TerminalFUPort, TTAProgram::TerminalProgramOperation, TTAProgram::TerminalRegister, TTAProgram::TerminalInstructionReference, TTAProgram::TerminalAddress, TTAProgram::TerminalLaneIDImmediate, TTAProgram::TerminalImmediate, TTAProgram::TerminalBasicBlockReference, and TTAProgram::TerminalSymbolReference.
Referenced by OutputPSocketResource::canAssign(), llvm::LLVMTCEBuilder::emitSelect(), BUBasicBlockScheduler::finalizeSchedule(), BasicBlockScheduler::handleDDG(), ITemplateBroker::isImmediateInTemplate(), DataDependenceGraph::mergeAndKeepSource(), DataDependenceGraph::mergeAndKeepUser(), BFShareOperandsLate::operator()(), BF2Scheduler::preAllocateFunctionUnits(), CycleLookBackSoftwareBypasser::removeDeadResults(), DataDependenceGraph::sanityCheck(), BUBasicBlockScheduler::scheduleRRMove(), PostpassOperandSharer::tryRemoveOperandWrite(), CopyingDelaySlotFiller::tryToAssignNodes(), PreOptimizer::tryToRemoveGuardInversingOp(), DataDependenceGraph::unMergeUser(), and BFMergeAndKeepUser::updateEdges().
|
virtual |
Returns the function unit of the port.
WrongSubclass | if the terminal is not an instance of TerminalFUPort. |
Reimplemented in TTAProgram::TerminalFUPort.
Definition at line 251 of file Terminal.cc.
Referenced by InputFUBroker::allAvailableResources(), MoveNodeGroupBuilder::build(), ControlFlowGraph::buildMBBFromBB(), UtilizationStats::calculateForInstruction(), POMDisassembler::createFUPort(), POMDisassembler::disassemble(), MoveNodeDuplicator::duplicateMove(), ExecutionPipelineBroker::earliestFromDestination(), ExecutionPipelineBroker::earliestFromSource(), MoveNode::earliestResultReadCycle(), CodeCompressorPlugin::encodeFUTerminal(), FUBroker::findDstFUOfMove(), ControlFlowGraph::findNextIndex(), BFOptimization::fuOfTerminal(), CompiledSimCodeGenerator::generateAddFUResult(), CompiledSimCodeGenerator::generateInstruction(), CopyingDelaySlotFiller::getMove(), BFOptimization::immCountPreventsScheduling(), OutputFUBroker::isAlreadyAssigned(), InputFUBroker::isAlreadyAssigned(), POMDisassembler::isCallOrJump(), ExecutionPipelineBroker::isMoveTrigger(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), MoveNode::latestTriggerWriteCycle(), BFLateBypassGuard::operator()(), BFPostpassBypass::operator()(), BFShareOperands::operator()(), SimProgramBuilder::processMove(), BFOptimization::RFReadPortCountPreventsScheduling(), DataDependenceGraph::sanityCheck(), BUBasicBlockScheduler::scheduleMove(), BFOptimization::setPrologDstFUAnno(), BFOptimization::setPrologSrcFUAnno(), BFUnscheduleFromBody::unscheduleOriginal(), and BFUnscheduleMove::unscheduleOriginal().
|
virtual |
Return the operation to which this terminal was originally bound.
NOTE! : Method must not be used for checkin if terminal contains opcode. See. operation().
Method is mainly used for preserving information to which operation port reference is bound, during TPEF -> POM -> TPEF write cycles.
Reimplemented in TTAProgram::TerminalFUPort.
Definition at line 341 of file Terminal.cc.
References __func__.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ProgramOperation::addNode(), MoveNodeGroupBuilder::build(), MachineConnectivityCheck::busConnectedToAnyFU(), ControlFlowEdge::edgePredicateFromMove(), llvm::LLVMTCEBuilder::hasAmbiguousASpaceRefs(), ExecutionPipelineResource::resourcesAllowTrigger(), DataDependenceGraph::sanityCheck(), and ExecutionPipelineResource::unassignDestination().
|
virtual |
Returns the immediate unit of the long immediate register.
Applicable only if the unit of the terminal is an instance of ImmediateUnit.
WrongSubclass | if the unit of the terminal is not an instance of ImmediateUnit. |
Reimplemented in TTAProgram::TerminalRegister.
Definition at line 240 of file Terminal.cc.
Referenced by CodeCompressorPlugin::addBitsForDstRegisterField(), OutputPSocketBroker::allAvailableResources(), IUBroker::allAvailableResources(), OutputPSocketBroker::assign(), ITemplateBroker::assign(), IUBroker::assign(), BFOptimization::assignCopyToPrologEpilog(), ITemplateBroker::assignImmediate(), UtilizationStats::calculateForInstruction(), BFOptimization::canAssign(), CopyingDelaySlotFiller::checkImmediatesAfter(), POMValidator::checkLongImmediates(), CopyingDelaySlotFiller::collectMoves(), TTAProgram::ProgramWriter::createCodeSection(), POMDisassembler::createImmediateAssignment(), POMDisassembler::createImmediateRegister(), CodeCompressorPlugin::encodeIUTerminal(), TTAProgram::TerminalRegister::equals(), CopyingDelaySlotFiller::findJumpImmediate(), ControlFlowGraph::findLimmWrite(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::firstScheduledRegisterRead(), DataDependenceGraph::firstScheduledRegisterReads(), CompiledSimCodeGenerator::generateInstruction(), CompiledSimSymbolGenerator::immediateRegisterSymbol(), OutputPSocketBroker::isAnyResourceAvailable(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterRead(), DataDependenceGraph::lastScheduledRegisterReads(), main(), BFShareOperandWithScheduled::operator()(), BFShareOperandLate::operator()(), LoopPrologAndEpilogBuilder::optimizeProlog(), SimProgramBuilder::processInstruction(), SimProgramBuilder::processSourceTerminal(), CodeCompressorPlugin::programImmediate(), BFOptimization::rmEC(), BFOptimization::rmLC(), TTAProgram::ProgramWriter::terminalResource(), CopyingDelaySlotFiller::tryToAssignNodes(), ITemplateBroker::unassignImmediate(), BFUnscheduleFromBody::unscheduleOriginal(), and BFUnscheduleMove::unscheduleOriginal().
|
virtual |
Return the index of the register (either a long immediate or a general-purpose register).
WrongSubclass | if the terminal is not an instance of TerminalRegister. |
Reimplemented in TTAProgram::TerminalRegister.
Definition at line 274 of file Terminal.cc.
Referenced by CodeCompressorPlugin::addBitsForDstRegisterField(), StaticProgramAnalyzer::addProgram(), InputPSocketBroker::assign(), OutputPSocketBroker::assign(), IUResource::assign(), BFOptimization::assignCopyToPrologEpilog(), ControlFlowGraph::buildMBBFromBB(), UtilizationStats::calculateForInstruction(), OutputPSocketResource::canAssign(), BFOptimization::canAssign(), TTAProgram::TPEFProgramFactory::canSourceBeAssigned(), CopyingDelaySlotFiller::checkImmediatesAfter(), CopyingDelaySlotFiller::collectMoves(), POMDisassembler::createImmediateRegister(), ProgramDependenceGraph::createJump(), POMDisassembler::createRegister(), DataDependenceGraph::destRenamed(), llvm::LLVMTCEBuilder::emitMove(), CodeCompressorPlugin::encodeIUTerminal(), CodeCompressorPlugin::encodeRFTerminal(), TTAProgram::TerminalRegister::equals(), CopyingDelaySlotFiller::findJumpImmediate(), ControlFlowGraph::findLimmWrite(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::firstScheduledRegisterKill(), DataDependenceGraph::firstScheduledRegisterRead(), DataDependenceGraph::firstScheduledRegisterReads(), DataDependenceGraph::firstScheduledRegisterWrite(), DataDependenceGraph::firstScheduledRegisterWrites(), DataDependenceGraph::guardRenamed(), CompiledSimSymbolGenerator::immediateRegisterSymbol(), IUResource::immediateValue(), IUResource::immediateWriteCycle(), RegisterRenamer::initializeFreeRegisters(), MoveNode::isSourceReg(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterKill(), DataDependenceGraph::lastScheduledRegisterRead(), DataDependenceGraph::lastScheduledRegisterReads(), DataDependenceGraph::lastScheduledRegisterWrites(), BFShareOperandWithScheduled::operator()(), BFShareOperandLate::operator()(), LoopPrologAndEpilogBuilder::optimizeProlog(), SimProgramBuilder::processBidirTerminal(), SimProgramBuilder::processInstruction(), SimProgramBuilder::processSourceTerminal(), DisassemblyRegister::registerName(), CompiledSimSymbolGenerator::registerSymbol(), BF2Scheduler::revertBBLiveRangeBookkeepingForDestination(), BF2Scheduler::revertBBLiveRangeBookkeepingForSource(), BFOptimization::rmEC(), BFOptimization::rmLC(), BasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleOperand(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleRRTempMoves(), BUBasicBlockScheduler::scheduleRRTempMoves(), TTAProgram::TerminalFUPort::setOperationIndex(), DataDependenceGraph::sourceRenamed(), TTAProgram::ProgramWriter::terminalResource(), PostpassOperandSharer::tryRemoveOperandWrite(), IUResource::unassign(), BFRenameLiveRange::undoSetTerminal(), BFUnscheduleMove::unscheduleOriginal(), and BFUnscheduleFromBody::unscheduleOriginal().
|
virtual |
Reimplemented in TTAProgram::TerminalInstructionReference.
|
virtual |
Returns a reference to the instruction to which the immediate points.
Reimplemented in TTAProgram::TerminalInstructionReference.
Definition at line 188 of file Terminal.cc.
Referenced by ControlFlowGraph::computeLeadersFromJumpSuccessors(), ProcedurePass::copyCfgToProcedure(), ControlFlowGraph::createJumps(), POMDisassembler::disassemble(), TTAProgram::Program::fixInstructionReferences(), ControlFlowGraph::jumpToBBN(), and CopyingDelaySlotFiller::updateJumpsAndCfg().
|
virtual |
Tells whether the terminal is an inline immediate value that refers to an address.
Reimplemented in TTAProgram::TerminalAddress.
Definition at line 75 of file Terminal.cc.
Referenced by TTAProgram::ProgramWriter::createCodeSection(), TTAProgram::TPEFProgramFactory::createInstruction(), TTAProgram::TerminalAddress::equals(), ProgramImageGenerator::generateProgramImage(), and TTAProgram::Program::replaceUniversalAddressSpaces().
|
virtual |
Tells whether the terminal is reference to a basic block.
Reimplemented in TTAProgram::TerminalBasicBlockReference.
Definition at line 139 of file Terminal.cc.
Referenced by ITemplateBroker::assign(), ITemplateBroker::assignImmediate(), ControlFlowGraph::buildMBBFromBB(), SimpleIfConverter::canConvert(), ControlFlowGraph::convertBBRefsToInstRefs(), ControlFlowGraph::jumpToBBN(), and MachineConnectivityCheck::requiredImmediateWidth().
|
virtual |
Tells whether the terminal is reference to a code symbol
Reimplemented in TTAProgram::TerminalSymbolReference.
Definition at line 154 of file Terminal.cc.
Referenced by ITemplateBroker::assign(), ITemplateBroker::assignImmediate(), ControlFlowGraph::buildMBBFromBB(), TTAProgram::Program::convertSymbolRefsToInsRefs(), POMDisassembler::disassemble(), ControlFlowGraph::jumpToBBN(), and MachineConnectivityCheck::requiredImmediateWidth().
|
virtual |
Tells whether the terminal is a function unit port (possibly, including an operation code).
Reimplemented in TTAProgram::TerminalFUPort.
Definition at line 118 of file Terminal.cc.
Referenced by CodeCompressorPlugin::addBitsForDestinationField(), CodeCompressorPlugin::addBitsForSourceField(), llvm::LLVMTCEBuilder::addCandidateLSUAnnotations(), RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), ProximMachineStateWindow::addMoves(), ProgramOperation::addNode(), StaticProgramAnalyzer::addProgram(), OutputFUBroker::allAvailableResources(), InputPSocketBroker::allAvailableResources(), OutputPSocketBroker::allAvailableResources(), MoveNodeGroupBuilder::build(), LLVMTCEDataDependenceGraphBuilder::buildLocalDDG(), ControlFlowGraph::buildMBBFromBB(), MachineConnectivityCheck::busConnectedToDestination(), UtilizationStats::calculateForInstruction(), OutputPSocketResource::canAssign(), POMValidator::checkCompiledSimulatability(), POMValidator::checkConnectivity(), POMValidator::checkSimulatability(), DataDependenceGraphBuilder::constructIndividualBB(), ControlFlowGraph::createJumps(), POMDisassembler::createTerminal(), MoveNodeDuplicator::duplicateMove(), ExecutionPipelineBroker::earliestFromSource(), CodeCompressorPlugin::encodeFUTerminal(), TTAProgram::TerminalFUPort::equals(), FUBroker::findDstFUOfMove(), BFOptimization::fuOfTerminal(), CompiledSimCodeGenerator::generateInstruction(), BF2Scheduler::getDstUnit(), CopyingDelaySlotFiller::getMove(), llvm::LLVMTCEBuilder::hasAmbiguousASpaceRefs(), BFOptimization::immCountPreventsScheduling(), BUMoveNodeSelector::initializeReadylist(), OutputFUBroker::isAlreadyAssigned(), InputFUBroker::isAlreadyAssigned(), OutputPSocketBroker::isAlreadyAssigned(), OutputPSocketBroker::isAnyResourceAvailable(), OutputFUBroker::isApplicable(), InputFUBroker::isApplicable(), OutputPSocketBroker::isApplicable(), TTAProgram::Move::isCall(), POMDisassembler::isCallOrJump(), TTAProgram::Move::isControlFlowMove(), TTAProgram::Move::isJump(), TTAProgram::Move::isTriggering(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), BFShareOperandsLate::operator()(), BFShareOperands::operator()(), BFScheduleBU::operator()(), ExecutionPipelineResource::poConflictsWithInputPort(), SimProgramBuilder::processBidirTerminal(), DataDependenceGraphBuilder::processDestination(), SimProgramBuilder::processMove(), DataDependenceGraphBuilder::processSource(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), BFOptimization::RFReadPortCountPreventsScheduling(), DataDependenceGraph::sanityCheck(), SequentialScheduler::scheduleOperandWrites(), BFOptimization::setPrologDstFUAnno(), BFOptimization::setPrologSrcFUAnno(), TTAProgram::BasicBlock::statistics(), TTAProgram::ProgramWriter::terminalResource(), ExecutionPipelineResource::testTriggerResult(), ProgramOperation::triggeringMove(), and PostpassOperandSharer::tryRemoveOperandWrite().
|
virtual |
Tells whether the terminal is a general-purpose register.
Reimplemented in TTAProgram::TerminalRegister.
Definition at line 107 of file Terminal.cc.
Referenced by CodeCompressorPlugin::addBitsForDestinationField(), CodeCompressorPlugin::addBitsForSourceField(), RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), TTAProgram::Instruction::addMove(), ProximMachineStateWindow::addMoves(), StaticProgramAnalyzer::addProgram(), OutputPSocketBroker::allAvailableResources(), LoopAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), ResourceConstraintAnalyzer::analyzeMoveNode(), ResourceConstraintAnalyzer::analyzeRegisterAntideps(), InputPSocketBroker::assign(), OutputPSocketBroker::assign(), ControlFlowGraph::buildMBBFromBB(), MachineConnectivityCheck::busConnectedToDestination(), UtilizationStats::calculateForInstruction(), OutputPSocketResource::canAssign(), POMValidator::checkConnectivity(), CopyingDelaySlotFiller::collectMoves(), ControlFlowGraph::computeLeadersFromJumpSuccessors(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), TTAProgram::TPEFProgramFactory::createInstruction(), ControlFlowGraph::createJumps(), DataDependenceGraph::createRegisterAntiDependenciesBetweenNodes(), POMDisassembler::createTerminal(), DataDependenceGraph::destRenamed(), llvm::LLVMTCEBuilder::emitMove(), CodeCompressorPlugin::encodeRFTerminal(), TTAProgram::TerminalRegister::equals(), LoopAnalyzer::findEndCond(), MemoryAliasAnalyzer::findIncrement(), LoopAnalyzer::findInitAndUpdate(), CopyingDelaySlotFiller::findJumpImmediate(), DataDependenceGraph::findLoopIndexUpdate(), DataDependenceGraph::findLoopLimitAndIndex(), MachineConnectivityCheck::findPossibleDestinationPorts(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::firstScheduledRegisterKill(), DataDependenceGraph::firstScheduledRegisterRead(), DataDependenceGraph::firstScheduledRegisterReads(), DataDependenceGraph::firstScheduledRegisterWrite(), DataDependenceGraph::firstScheduledRegisterWrites(), DataDependenceGraph::fixInterBBAntiEdges(), CompiledSimCodeGenerator::generateAddFUResult(), CompiledSimCodeGenerator::generateInstruction(), DataDependenceGraph::guardRenamed(), DataDependenceGraph::guardRestored(), RFAccessTracker::handleEvent(), BasicBlockScheduler::handleRemovedResultMoves(), RegisterRenamer::initializeFreeRegisters(), OffsetAliasAnalyzer::isAddressTraceable(), OutputPSocketBroker::isAlreadyAssigned(), OutputPSocketBroker::isAnyResourceAvailable(), OutputPSocketBroker::isApplicable(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterKill(), DataDependenceGraph::lastScheduledRegisterRead(), DataDependenceGraph::lastScheduledRegisterReads(), DataDependenceGraph::lastScheduledRegisterWrites(), TTAProgram::CodeGenerator::loadTerminal(), CompiledSimSymbolGenerator::moveOperandSymbol(), BFRenameSource::operator()(), BFScheduleBU::operator()(), SimProgramBuilder::processBidirTerminal(), DataDependenceGraphBuilder::processDestination(), DataDependenceGraphBuilder::processSource(), RegisterRenamer::renameDestinationRegister(), RegisterRenamer::renameSourceRegister(), BF2Scheduler::revertBBLiveRangeBookkeepingForDestination(), BF2Scheduler::revertBBLiveRangeBookkeepingForSource(), DataDependenceGraph::sanityCheck(), BasicBlockScheduler::scheduleMove(), BUBasicBlockScheduler::scheduleMove(), DataDependenceGraph::sourceRenamed(), TTAProgram::CodeGenerator::storeTerminal(), TTAProgram::ProgramWriter::terminalResource(), PostpassOperandSharer::tryRemoveOperandWrite(), PreOptimizer::tryToOptimizeAddressReg(), SimpleBrokerDirector::unassign(), DataDependenceGraph::unMergeUser(), CopyingDelaySlotFiller::writesRegister(), and SimpleIfConverter::writesRegister().
|
virtual |
Tells whether the terminal is an inline immediate value.
Reimplemented in TTAProgram::TerminalImmediate.
Definition at line 63 of file Terminal.cc.
Referenced by CodeCompressorPlugin::addBitsForSourceField(), RegisterCopyAdder::addConnectionRegisterCopies(), SimpleICOptimizer::addConnections(), StaticProgramAnalyzer::addProgram(), BusBroker::allAvailableResources(), LoopAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), BFSwapOperands::BFSwapOperands(), ControlFlowGraph::buildMBBFromBB(), UtilizationStats::calculateForInstruction(), IUResource::canAssign(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), TTAProgram::ProgramWriter::createCodeSection(), POMDisassembler::createMove(), POMDisassembler::createTerminal(), CodeCompressorPlugin::encodeImmediateTerminal(), TTAProgram::TerminalImmediate::equals(), MemoryAliasAnalyzer::findIncrement(), LoopAnalyzer::findInitAndUpdate(), CopyingDelaySlotFiller::findJumpImmediate(), DataDependenceGraph::findLoopIndexUpdate(), DataDependenceGraph::findLoopLimitAndIndex(), ProgramImageGenerator::generateProgramImage(), ConstantAliasAnalyzer::getConstantAddress(), OffsetAliasAnalyzer::isAddressTraceable(), BusBroker::isAvailable(), CompiledSimSymbolGenerator::moveOperandSymbol(), ResourceConstraintAnalyzer::optimalScheduleResourceUsage(), SimProgramBuilder::processMove(), TTAProgram::Move::sourceSocket(), TTAProgram::ProgramWriter::terminalResource(), PreOptimizer::tryToRemoveEq(), PreOptimizer::tryToRemoveXor(), and LoopAnalyzer::tryTrackCommonAncestor().
|
virtual |
Tells whether the terminal is a long immediate register.
Reimplemented in TTAProgram::TerminalRegister.
Definition at line 97 of file Terminal.cc.
Referenced by CodeCompressorPlugin::addBitsForSourceField(), OutputPSocketBroker::allAvailableResources(), IUBroker::allAvailableResources(), LoopAnalyzer::analyze(), OutputPSocketBroker::assign(), IUResource::assign(), IUBroker::assign(), CycleLookBackSoftwareBypasser::bypassNode(), UtilizationStats::calculateForInstruction(), OutputPSocketResource::canAssign(), POMValidator::checkConnectivity(), CopyingDelaySlotFiller::checkImmediatesAfter(), POMValidator::checkLongImmediates(), CopyingDelaySlotFiller::collectMoves(), ControlFlowGraph::computeLeadersFromJumpSuccessors(), TTAProgram::TPEFProgramFactory::createInstruction(), ControlFlowGraph::createJumps(), POMDisassembler::createTerminal(), CodeCompressorPlugin::encodeIUTerminal(), TTAProgram::TerminalRegister::equals(), CopyingDelaySlotFiller::findJumpImmediate(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::firstScheduledRegisterRead(), DataDependenceGraph::firstScheduledRegisterReads(), CompiledSimCodeGenerator::generateInstruction(), IUResource::immediateValue(), IUResource::immediateWriteCycle(), OutputPSocketBroker::isAlreadyAssigned(), OutputPSocketBroker::isAnyResourceAvailable(), OutputPSocketBroker::isApplicable(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterRead(), DataDependenceGraph::lastScheduledRegisterReads(), CompiledSimSymbolGenerator::moveOperandSymbol(), BFShareOperandsLate::operator()(), BFShareOperandWithScheduled::operator()(), BFShareOperandLate::operator()(), LoopPrologAndEpilogBuilder::optimizeProlog(), SimProgramBuilder::processInstruction(), SimProgramBuilder::processSourceTerminal(), CodeCompressorPlugin::programImmediate(), TTAProgram::ProgramWriter::terminalResource(), PostpassOperandSharer::tryRemoveOperandWrite(), CopyingDelaySlotFiller::tryToAssignNodes(), IUResource::unassign(), BFUnscheduleMove::unscheduleOriginal(), and BFUnscheduleFromBody::unscheduleOriginal().
|
virtual |
Tells whether the terminal is an inline immediate value that refers to an instruction address.
Reimplemented in TTAProgram::TerminalInstructionAddress.
Definition at line 87 of file Terminal.cc.
Referenced by ITemplateBroker::assign(), ITemplateBroker::assignImmediate(), SimpleIfConverter::canConvert(), ControlFlowGraph::computeLeadersFromJumpSuccessors(), ProcedurePass::copyCfgToProcedure(), BF2Scheduler::countLoopInvariantValueUsages(), ControlFlowGraph::createBBEdges(), TTAProgram::ProgramWriter::createCodeSection(), ControlFlowGraph::createJumps(), POMDisassembler::disassemble(), TTAProgram::TerminalProgramOperation::equals(), CopyingDelaySlotFiller::fillDelaySlots(), TTAProgram::Program::fixInstructionReferences(), ProgramImageGenerator::generateProgramImage(), ControlFlowGraph::jumpToBBN(), LoopPrologAndEpilogBuilder::moveJumpDestination(), ControlFlowGraph::removeJumpToTarget(), TTAProgram::Program::replaceUniversalAddressSpaces(), and MachineConnectivityCheck::requiredImmediateWidth().
|
virtual |
Tells whether terminal transports an opcode to a function unit port.
WrongSubclass | always. |
Reimplemented in TTAProgram::TerminalFUPort.
Definition at line 285 of file Terminal.cc.
References __func__.
Referenced by StaticProgramAnalyzer::addProgram(), ExecutionPipelineResource::assignDestination(), MoveNodeGroupBuilder::build(), POMValidator::checkCompiledSimulatability(), POMValidator::checkSimulatability(), CodeCompressorPlugin::encodeFUTerminal(), ProcedureTransferTracker::handleEvent(), POMDisassembler::isCallOrJump(), BFShareOperandsLate::operator()(), SimProgramBuilder::processBidirTerminal(), ExecutionPipelineResource::resourcesAllowTrigger(), PostpassOperandSharer::tryRemoveOperandWrite(), and ExecutionPipelineResource::unassignDestination().
|
virtual |
Reimplemented in TTAProgram::TerminalProgramOperation.
Definition at line 144 of file Terminal.cc.
Referenced by ControlFlowGraph::buildMBBFromBB().
|
virtual |
Tells whether the terminal is a the return address port in gcu.
Reimplemented in TTAProgram::TerminalFUPort.
Definition at line 129 of file Terminal.cc.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ControlFlowGraph::buildMBBFromBB(), MachineConnectivityCheck::busConnectedToDestination(), CopyingDelaySlotFiller::collectMoves(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), MoveNodeDuplicator::duplicateMove(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), CopyingDelaySlotFiller::getMove(), SequentialScheduler::handleBasicBlock(), BUBasicBlockScheduler::handleDDG(), BasicBlockScheduler::handleDDG(), BUBasicBlockScheduler::handleLoopDDG(), BasicBlockScheduler::handleLoopDDG(), llvm::LLVMTCEBuilder::hasAmbiguousASpaceRefs(), main(), and CriticalPathBBMoveNodeSelector::mightBeReady().
|
virtual |
Tells whether terminal is a triggering FU port.
WrongSubclass | always. |
Reimplemented in TTAProgram::TerminalFUPort.
Definition at line 298 of file Terminal.cc.
References __func__.
Referenced by ExecutionPipelineResource::assignDestination(), MoveNodeGroupBuilder::build(), main(), BFShareOperandsLate::operator()(), BFPushMoveUp::operator()(), BFShareOperands::operator()(), BFScheduleBU::operator()(), SequentialScheduler::scheduleOperandWrites(), BasicBlockScheduler::scheduleOperandWrites(), BUBasicBlockScheduler::scheduleOperandWrites(), PostpassOperandSharer::tryRemoveOperandWrite(), and ExecutionPipelineResource::unassignDestination().
|
virtual |
Tells whether the terminal is a reg in UniversalMachine
Reimplemented in TTAProgram::TerminalRegister.
Definition at line 166 of file Terminal.cc.
Referenced by BF2Scheduler::isDestinationUniversalReg(), BF2Scheduler::isSourceUniversalReg(), and BUMoveNodeSelector::mightBeReady().
|
virtual |
Return the operation code transported into the function unit port by this terminal.
Throws an error condition if the terminal does not read from or write to a function unit port (that is, if the terminal if of a wrong type). Throws an error condition also if the terminal does not access an opcode-setting function unit port.
WrongSubclass | If the terminal is of the wrong type. |
InvalidData | If the terminal is of the right type, but it does not carry an operation-code. |
Reimplemented in TTAProgram::TerminalFUPort.
Definition at line 319 of file Terminal.cc.
References __func__.
Referenced by StaticProgramAnalyzer::addProgram(), CopyingDelaySlotFiller::allowedToSpeculate(), ExecutionPipelineResource::assignDestination(), MoveNodeGroupBuilder::build(), UtilizationStats::calculateForInstruction(), POMValidator::checkCompiledSimulatability(), POMValidator::checkSimulatability(), ControlFlowEdge::edgePredicateFromMove(), CodeCompressorPlugin::encodeFUTerminal(), POMDisassembler::isCallOrJump(), SimProgramBuilder::processBidirTerminal(), ExecutionPipelineResource::resourcesAllowTrigger(), and ExecutionPipelineResource::unassignDestination().
|
virtual |
Return the index that identifies the operation input or output that is represented by this terminal.
Throws an error condition if the terminal does not read from or write to a function unit port (that is, if the terminal if of a wrong type). Throws an error condition also if the terminal does not access an opcode-setting function unit port, nor it bears auxiliary "hint operation" information.
WrongSubclass | If the terminal is of the wrong type. |
InvalidData | If the terminal is of the right type, but does not have any operation-related information. |
Reimplemented in TTAProgram::TerminalFUPort.
Definition at line 364 of file Terminal.cc.
References __func__.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ProgramOperation::addInputNode(), ProgramOperation::addOutputNode(), BFSwapOperands::BFSwapOperands(), BusResource::canAssign(), ExecutionPipelineResource::canAssignDestination(), ExecutionPipelineResource::canAssignSource(), MoveNodeDuplicator::duplicateMove(), ExecutionPipelineBroker::earliestFromSource(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), CopyingDelaySlotFiller::getMove(), llvm::LLVMTCEBuilder::hasAmbiguousASpaceRefs(), BUMoveNodeSelector::initializeReadylist(), CriticalPathBBMoveNodeSelector::initializeReadylist(), ExecutionPipelineBroker::isMoveTrigger(), BF2Scheduler::isTrigger(), DataDependenceGraphBuilder::isTriggering(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), MoveNode::latestTriggerWriteCycle(), BF2Scheduler::mustBeTrigger(), ExecutionPipelineResource::operandOverwritten(), ExecutionPipelineResource::operandPort(), ExecutionPipelineResource::operandTooLate(), BFLateBypassGuard::operator()(), BFEarlyGuardBypass::operator()(), BFDropPreShared::operator()(), BFShareOperand::operator()(), BFShareOperandWithScheduled::operator()(), BFShareOperands::operator()(), ProgramOperation::outputIndexOfMove(), BF2ScheduleFront::prefResultCycle(), ProgramOperation::removeInputNode(), ProgramOperation::removeOutputNode(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), ProgramOperation::switchInputs(), ExecutionPipelineResource::testTriggerResult(), ExecutionPipelineResource::triggerTooEarly(), PreOptimizer::tryToRemoveEq(), BUBasicBlockScheduler::tryToSwitchInputs(), and BasicBlockScheduler::tryToSwitchInputs().
bool TTAProgram::Terminal::operator== | ( | const Terminal & | other | ) | const |
Comparison operator for Terminals.
Delegates the comparison to dynamically bound equals() method.
other | Comparison target. |
Definition at line 417 of file Terminal.cc.
|
virtual |
Return the port accessed by this terminal.
WrongSubclass | if the terminal is not an instance of TerminalFUPort or TerminalRegister. |
Reimplemented in TTAProgram::TerminalFUPort, and TTAProgram::TerminalRegister.
Definition at line 378 of file Terminal.cc.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ProximMachineStateWindow::addMoves(), InputPSocketBroker::allAvailableResources(), OutputPSocketBroker::allAvailableResources(), BusBroker::allAvailableResources(), OutputPSocketResource::assign(), MoveNodeGroupBuilder::build(), ControlFlowGraph::buildMBBFromBB(), MachineConnectivityCheck::busConnectedToDestination(), UtilizationStats::calculateForInstruction(), OutputPSocketResource::canAssign(), BusResource::canAssign(), POMValidator::checkConnectivity(), ExecutionPipelineResource::checkOperandAllowed(), CopyingDelaySlotFiller::collectMoves(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), POMDisassembler::createFUPort(), TTAProgram::TPEFProgramFactory::createInstruction(), llvm::LLVMTCEBuilder::createMove(), TTAProgram::Move::destinationSocket(), llvm::LLVMTCEBuilder::emitMove(), CodeCompressorPlugin::encodeFUTerminal(), CodeCompressorPlugin::encodeIUTerminal(), CodeCompressorPlugin::encodeRFTerminal(), BUBasicBlockScheduler::findBypassDestinations(), MachineConnectivityCheck::findPossibleDestinationPorts(), MachineConnectivityCheck::findPossibleSourcePorts(), CompiledSimCodeGenerator::generateAddFUResult(), CompiledSimCodeGenerator::generateInstruction(), BF2Scheduler::getDstUnit(), ControlFlowGraph::indirectJump(), InputPSocketBroker::isAlreadyAssigned(), OutputPSocketBroker::isAlreadyAssigned(), OutputPSocketBroker::isAnyResourceAvailable(), BusBroker::isAvailable(), main(), CompiledSimSymbolGenerator::moveOperandSymbol(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), BFLateBypasses::operator()(), BFShareOperands::operator()(), ExecutionPipelineResource::poConflictsWithInputPort(), SimProgramBuilder::processBidirTerminal(), DataDependenceGraphBuilder::processDestination(), SimProgramBuilder::processMove(), DataDependenceGraphBuilder::processSource(), RegisterRenamer::renameLiveRange(), TTAProgram::Move::sourceSocket(), TTAProgram::ProgramWriter::terminalResource(), ProgramOperation::triggeringMove(), ExecutionPipelineResource::triggerTooEarly(), PostpassOperandSharer::tryRemoveOperandWrite(), and InputPSocketBroker::unassign().
|
virtual |
Returns the register file of the general-purpose register.
Applicable only if the unit of the terminal is an instance of RegisterFile.
WrongSubclass | if the unit of the terminal is not an instance of RegisterFile. |
Reimplemented in TTAProgram::TerminalRegister.
Definition at line 225 of file Terminal.cc.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), InputPSocketBroker::allAvailableResources(), OutputPSocketBroker::allAvailableResources(), ResourceConstraintAnalyzer::analyzeMoveNode(), ResourceConstraintAnalyzer::analyzeRegisterAntideps(), InputPSocketBroker::assign(), OutputPSocketBroker::assign(), UtilizationStats::calculateForInstruction(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), ProgramDependenceGraph::createJump(), POMDisassembler::createRegister(), DataDependenceGraph::destRenamed(), llvm::LLVMTCEBuilder::emitMove(), CodeCompressorPlugin::encodeRFTerminal(), TTAProgram::TerminalRegister::equals(), CopyingDelaySlotFiller::findJumpImmediate(), DataDependenceGraph::firstRegisterCycle(), DataDependenceGraph::firstScheduledRegisterKill(), DataDependenceGraph::firstScheduledRegisterRead(), DataDependenceGraph::firstScheduledRegisterReads(), DataDependenceGraph::firstScheduledRegisterWrite(), DataDependenceGraph::firstScheduledRegisterWrites(), DataDependenceGraph::guardRenamed(), RFAccessTracker::handleEvent(), BasicBlockScheduler::handleRemovedResultMoves(), RegisterRenamer::initializeFreeRegisters(), OutputPSocketBroker::isAnyResourceAvailable(), MoveNode::isSourceReg(), BFOptimization::jumpGuardAvailableCycle(), DataDependenceGraph::lastRegisterCycle(), DataDependenceGraph::lastScheduledRegisterKill(), DataDependenceGraph::lastScheduledRegisterRead(), DataDependenceGraph::lastScheduledRegisterReads(), DataDependenceGraph::lastScheduledRegisterWrites(), TTAProgram::CodeGenerator::loadTerminal(), BFScheduleBU::operator()(), SimProgramBuilder::processBidirTerminal(), DisassemblyRegister::registerName(), CompiledSimSymbolGenerator::registerSymbol(), RegisterRenamer::renameDestinationRegister(), RegisterRenamer::renameSourceRegister(), BF2Scheduler::revertBBLiveRangeBookkeepingForDestination(), BF2Scheduler::revertBBLiveRangeBookkeepingForSource(), BFOptimization::RFReadPortCountPreventsScheduling(), DataDependenceGraph::sanityCheck(), BasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleInputOperandTempMoves(), BUBasicBlockScheduler::scheduleOperand(), BasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReads(), BUBasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleRRTempMoves(), BUBasicBlockScheduler::scheduleRRTempMoves(), DataDependenceGraph::sourceRenamed(), TTAProgram::CodeGenerator::storeTerminal(), TTAProgram::ProgramWriter::terminalResource(), PostpassOperandSharer::tryRemoveOperandWrite(), PreOptimizer::tryToOptimizeAddressReg(), and BFRenameLiveRange::undoSetTerminal().
|
virtual |
Change the register of the register file to the given index.
index | The new register index. |
OutOfRange | if index is not smaller than the size of the register file or immediate unit it belongs to. |
WrongSubclass | if the terminal is not an instance of TerminalRegister. |
Reimplemented in TTAProgram::TerminalRegister.
Definition at line 392 of file Terminal.cc.
|
virtual |
Set a new referred instruction.
ref | The new instruction reference. |
WrongSubclass | if the terminal is not an instance of TerminalInstructionAddress |
Reimplemented in TTAProgram::TerminalInstructionReference.
Definition at line 404 of file Terminal.cc.
Referenced by llvm::LLVMTCEBuilder::doFinalization(), TTAProgram::Program::fixInstructionReferences(), and LoopPrologAndEpilogBuilder::moveJumpDestination().
|
pure virtual |
Implemented in TTAProgram::TerminalFUPort, TTAProgram::TerminalRegister, TTAProgram::TerminalLaneIDImmediate, TTAProgram::TerminalImmediate, and TTAProgram::TerminalSymbolReference.
Referenced by ControlFlowGraph::buildMBBFromBB(), TTAProgram::Program::convertSymbolRef(), TTAProgram::Program::convertSymbolRefsToInsRefs(), POMDisassembler::disassemble(), and main().
|
virtual |
Returns the value of the inline immediate.
WrongSubclass | if the terminal is not an instance of TerminalImmediate. |
Reimplemented in TTAProgram::TerminalInstructionAddress, TTAProgram::TerminalLaneIDImmediate, TTAProgram::TerminalImmediate, TTAProgram::TerminalBasicBlockReference, and TTAProgram::TerminalSymbolReference.
Definition at line 178 of file Terminal.cc.
Referenced by StaticProgramAnalyzer::addProgram(), LoopAnalyzer::analyze(), OffsetAliasAnalyzer::analyze(), ControlFlowGraph::buildMBBFromBB(), BF2Scheduler::countLoopInvariantValueUsages(), TTAProgram::ProgramWriter::createCodeSection(), POMDisassembler::createInlineImmediate(), POMDisassembler::createMove(), MemoryAliasAnalyzer::detectConstantScale(), CodeCompressorPlugin::encodeImmediateTerminal(), TTAProgram::TerminalImmediate::equals(), TTAProgram::TerminalLaneIDImmediate::equals(), LoopAnalyzer::findEndCond(), MemoryAliasAnalyzer::findIncrement(), LoopAnalyzer::findInitAndUpdate(), DataDependenceGraph::findLoopIndexUpdate(), ProgramImageGenerator::generateProgramImage(), ConstantAliasAnalyzer::getConstantAddress(), StackAliasAnalyzer::getStackOffset(), CompiledSimSymbolGenerator::moveOperandSymbol(), SimProgramBuilder::processMove(), TTAProgram::Program::replaceUniversalAddressSpaces(), MemoryAliasAnalyzer::searchLoopIndexBasedIncrement(), PreOptimizer::tryToRemoveEq(), PreOptimizer::tryToRemoveXor(), and LoopAnalyzer::tryTrackCommonAncestor().