OpenASIP 2.2
Loading...
Searching...
No Matches
Public Member Functions | List of all members
TTAProgram::Terminal Class Referenceabstract

#include <Terminal.hh>

Inheritance diagram for TTAProgram::Terminal:
Inheritance graph
Collaboration diagram for TTAProgram::Terminal:
Collaboration graph

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 InstructionReferenceinstructionReference () const
 
virtual InstructionReferenceinstructionReference ()
 
virtual const TTAMachine::RegisterFileregisterFile () const
 
virtual const TTAMachine::ImmediateUnitimmediateUnit () const
 
virtual const TTAMachine::FunctionUnitfunctionUnit () const
 
virtual const BasicBlockbasicBlock () const
 
virtual int index () const
 
virtual bool isOpcodeSetting () const
 
virtual bool isTriggering () const
 
virtual Operationoperation () const
 
virtual OperationhintOperation () const
 
virtual int operationIndex () const
 
virtual const TTAMachine::Portport () const
 
virtual void setIndex (int index)
 
virtual void setInstructionReference (InstructionReference ref)
 
virtual Terminalcopy () const =0
 
bool operator== (const Terminal &other) const
 
virtual bool equals (const Terminal &other) const =0
 
virtual TCEString toString () const =0
 

Detailed Description

Models any possible source or destination of a move.

Definition at line 60 of file Terminal.hh.

Constructor & Destructor Documentation

◆ Terminal()

TTAProgram::Terminal::Terminal ( )

The constructor.

Definition at line 48 of file Terminal.cc.

48 {
49}

◆ ~Terminal()

TTAProgram::Terminal::~Terminal ( )
virtual

The destructor.

Definition at line 54 of file Terminal.cc.

54 {
55}

Member Function Documentation

◆ address()

Address TTAProgram::Terminal::address ( ) const
virtual

Returns the address held by this terminal.

Returns
A memory address.
Exceptions
WrongSubclassif the terminal is not an instance of TerminalAddress.

Reimplemented in TTAProgram::TerminalAddress, TTAProgram::TerminalInstructionReference, TTAProgram::TerminalProgramOperation, and TTAProgram::TerminalInstructionAddress.

Definition at line 210 of file Terminal.cc.

210 {
211 throw WrongSubclass(__FILE__, __LINE__);
212}

Referenced by TTAProgram::TPEFProgramFactory::build(), TTAProgram::ProgramWriter::createCodeSection(), and TTAProgram::TerminalAddress::equals().

◆ basicBlock()

const BasicBlock & TTAProgram::Terminal::basicBlock ( ) const
virtual

Returns a reference to the basic block to which the immediate points.

Returns
A reference to the basic block to which the immediate points.

Reimplemented in TTAProgram::TerminalBasicBlockReference.

Definition at line 261 of file Terminal.cc.

261 {
262 throw WrongSubclass(__FILE__, __LINE__);
263}

Referenced by ControlFlowGraph::buildMBBFromBB(), ControlFlowGraph::convertBBRefsToInstRefs(), and ControlFlowGraph::jumpToBBN().

◆ copy()

virtual Terminal * TTAProgram::Terminal::copy ( ) const
pure virtual

◆ equals()

virtual bool TTAProgram::Terminal::equals ( const Terminal other) const
pure virtual

◆ functionUnit()

const FunctionUnit & TTAProgram::Terminal::functionUnit ( ) const
virtual

Returns the function unit of the port.

Exceptions
WrongSubclassif the terminal is not an instance of TerminalFUPort.

Reimplemented in TTAProgram::TerminalFUPort.

Definition at line 251 of file Terminal.cc.

251 {
252 throw WrongSubclass(__FILE__, __LINE__);
253}

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(), InputFUBroker::isAlreadyAssigned(), OutputFUBroker::isAlreadyAssigned(), POMDisassembler::isCallOrJump(), ExecutionPipelineBroker::isMoveTrigger(), ExecutionPipelineBroker::latestFromDestination(), ExecutionPipelineBroker::latestFromSource(), MoveNode::latestTriggerWriteCycle(), BFLateBypassGuard::operator()(), BFShareOperands::operator()(), BFPostpassBypass::operator()(), SimProgramBuilder::processMove(), BFOptimization::RFReadPortCountPreventsScheduling(), DataDependenceGraph::sanityCheck(), BUBasicBlockScheduler::scheduleMove(), BFOptimization::setPrologDstFUAnno(), BFOptimization::setPrologSrcFUAnno(), BFUnscheduleFromBody::unscheduleOriginal(), and BFUnscheduleMove::unscheduleOriginal().

◆ hintOperation()

Operation & TTAProgram::Terminal::hintOperation ( ) const
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.

Returns
The operation code to which terminal was originally bound. Null operation if terminal does not contain operation code.
Todo:
This should be probably merged with operation() as "hints" are not really useful, we should make sure the operation of the move is known.

Reimplemented in TTAProgram::TerminalFUPort.

Definition at line 341 of file Terminal.cc.

341 {
342 throw WrongSubclass(
343 __FILE__, __LINE__, __func__,
344 "Terminal must be TerminalFUPort for this method.");
345}
#define __func__

References __func__.

Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ProgramOperation::addNode(), MoveNodeGroupBuilder::build(), MachineConnectivityCheck::busConnectedToAnyFU(), ControlFlowEdge::edgePredicateFromMove(), llvm::LLVMTCEBuilder::hasAmbiguousASpaceRefs(), ExecutionPipelineResource::resourcesAllowTrigger(), DataDependenceGraph::sanityCheck(), and ExecutionPipelineResource::unassignDestination().

◆ immediateUnit()

const ImmediateUnit & TTAProgram::Terminal::immediateUnit ( ) const
virtual

Returns the immediate unit of the long immediate register.

Applicable only if the unit of the terminal is an instance of ImmediateUnit.

Returns
The immediate unit of the long immediate register.
Exceptions
WrongSubclassif the unit of the terminal is not an instance of ImmediateUnit.

Reimplemented in TTAProgram::TerminalRegister.

Definition at line 240 of file Terminal.cc.

240 {
241 throw WrongSubclass(__FILE__, __LINE__);
242}

Referenced by CodeCompressorPlugin::addBitsForDstRegisterField(), OutputPSocketBroker::allAvailableResources(), IUBroker::allAvailableResources(), ITemplateBroker::assign(), OutputPSocketBroker::assign(), IUBroker::assign(), BFOptimization::assignCopyToPrologEpilog(), 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(), BFShareOperandLate::operator()(), BFShareOperandWithScheduled::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().

◆ index()

int TTAProgram::Terminal::index ( ) const
virtual

Return the index of the register (either a long immediate or a general-purpose register).

Returns
The index of the register.
Exceptions
WrongSubclassif the terminal is not an instance of TerminalRegister.

Reimplemented in TTAProgram::TerminalRegister.

Definition at line 274 of file Terminal.cc.

274 {
275 throw WrongSubclass(__FILE__, __LINE__);
276}

Referenced by CodeCompressorPlugin::addBitsForDstRegisterField(), StaticProgramAnalyzer::addProgram(), IUResource::assign(), InputPSocketBroker::assign(), OutputPSocketBroker::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(), BFShareOperandLate::operator()(), BFShareOperandWithScheduled::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(), BasicBlockScheduler::scheduleResultReadTempMoves(), BUBasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleRRTempMoves(), BUBasicBlockScheduler::scheduleRRTempMoves(), TTAProgram::TerminalFUPort::setOperationIndex(), DataDependenceGraph::sourceRenamed(), TTAProgram::ProgramWriter::terminalResource(), PostpassOperandSharer::tryRemoveOperandWrite(), IUResource::unassign(), BFRenameLiveRange::undoSetTerminal(), BFUnscheduleFromBody::unscheduleOriginal(), and BFUnscheduleMove::unscheduleOriginal().

◆ instructionReference() [1/2]

InstructionReference & TTAProgram::Terminal::instructionReference ( )
virtual

Returns a reference to the instruction to which the immediate points.

Returns
A reference to the instruction to which the immediate points.

Reimplemented in TTAProgram::TerminalInstructionReference.

Definition at line 198 of file Terminal.cc.

198 {
199 throw WrongSubclass(__FILE__, __LINE__);
200}

◆ instructionReference() [2/2]

const InstructionReference & TTAProgram::Terminal::instructionReference ( ) const
virtual

Returns a reference to the instruction to which the immediate points.

Returns
A reference to the instruction to which the immediate points.

Reimplemented in TTAProgram::TerminalInstructionReference.

Definition at line 188 of file Terminal.cc.

188 {
189 throw WrongSubclass(__FILE__, __LINE__);
190}

Referenced by ControlFlowGraph::computeLeadersFromJumpSuccessors(), ProcedurePass::copyCfgToProcedure(), ControlFlowGraph::createJumps(), POMDisassembler::disassemble(), TTAProgram::Program::fixInstructionReferences(), ControlFlowGraph::jumpToBBN(), and CopyingDelaySlotFiller::updateJumpsAndCfg().

◆ isAddress()

bool TTAProgram::Terminal::isAddress ( ) const
virtual

Tells whether the terminal is an inline immediate value that refers to an address.

Returns
True if the terminal is an inline immediate value that refers to an address.

Reimplemented in TTAProgram::TerminalAddress.

Definition at line 75 of file Terminal.cc.

75 {
76 return false;
77}

Referenced by TTAProgram::ProgramWriter::createCodeSection(), TTAProgram::TerminalAddress::equals(), ProgramImageGenerator::generateProgramImage(), and TTAProgram::Program::replaceUniversalAddressSpaces().

◆ isBasicBlockReference()

bool TTAProgram::Terminal::isBasicBlockReference ( ) const
virtual

Tells whether the terminal is reference to a basic block.

Returns
True if the terminal is a ref to a basic block

Reimplemented in TTAProgram::TerminalBasicBlockReference.

Definition at line 139 of file Terminal.cc.

139 {
140 return false;
141}

Referenced by ITemplateBroker::assign(), ControlFlowGraph::buildMBBFromBB(), SimpleIfConverter::canConvert(), ControlFlowGraph::convertBBRefsToInstRefs(), ControlFlowGraph::jumpToBBN(), and MachineConnectivityCheck::requiredImmediateWidth().

◆ isCodeSymbolReference()

bool TTAProgram::Terminal::isCodeSymbolReference ( ) const
virtual

Tells whether the terminal is reference to a code symbol

Returns
True if the terminal is a ref to a code symbol

Reimplemented in TTAProgram::TerminalSymbolReference.

Definition at line 154 of file Terminal.cc.

154 {
155 return false;
156}

Referenced by ITemplateBroker::assign(), ControlFlowGraph::buildMBBFromBB(), TTAProgram::Program::convertSymbolRefsToInsRefs(), POMDisassembler::disassemble(), ControlFlowGraph::jumpToBBN(), and MachineConnectivityCheck::requiredImmediateWidth().

◆ isFUPort()

bool TTAProgram::Terminal::isFUPort ( ) const
virtual

Tells whether the terminal is a function unit port (possibly, including an operation code).

Returns
True if the terminal is a function unit port.

Reimplemented in TTAProgram::TerminalFUPort.

Definition at line 118 of file Terminal.cc.

118 {
119 return false;
120}

Referenced by CodeCompressorPlugin::addBitsForDestinationField(), CodeCompressorPlugin::addBitsForSourceField(), llvm::LLVMTCEBuilder::addCandidateLSUAnnotations(), RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), ProximMachineStateWindow::addMoves(), ProgramOperation::addNode(), StaticProgramAnalyzer::addProgram(), InputPSocketBroker::allAvailableResources(), OutputFUBroker::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(), InputFUBroker::isAlreadyAssigned(), OutputFUBroker::isAlreadyAssigned(), OutputPSocketBroker::isAlreadyAssigned(), OutputPSocketBroker::isAnyResourceAvailable(), OutputPSocketBroker::isApplicable(), OutputFUBroker::isApplicable(), InputFUBroker::isApplicable(), TTAProgram::Move::isCall(), POMDisassembler::isCallOrJump(), TTAProgram::Move::isControlFlowMove(), TTAProgram::Move::isJump(), TTAProgram::Move::isTriggering(), ExecutionPipelineResource::operandSharePreventsTriggerForScheduledResult(), BFScheduleBU::operator()(), BFShareOperands::operator()(), BFShareOperandsLate::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().

◆ isGPR()

bool TTAProgram::Terminal::isGPR ( ) const
virtual

Tells whether the terminal is a general-purpose register.

Returns
True if the terminal is a general-purpose register.

Reimplemented in TTAProgram::TerminalRegister.

Definition at line 107 of file Terminal.cc.

107 {
108 return false;
109}

Referenced by CodeCompressorPlugin::addBitsForDestinationField(), CodeCompressorPlugin::addBitsForSourceField(), RegisterCopyAdder::addConnectionRegisterCopies(), 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(), BUBasicBlockScheduler::scheduleMove(), BasicBlockScheduler::scheduleMove(), DataDependenceGraph::sourceRenamed(), TTAProgram::CodeGenerator::storeTerminal(), TTAProgram::ProgramWriter::terminalResource(), PostpassOperandSharer::tryRemoveOperandWrite(), PreOptimizer::tryToOptimizeAddressReg(), SimpleBrokerDirector::unassign(), DataDependenceGraph::unMergeUser(), SimpleIfConverter::writesRegister(), and CopyingDelaySlotFiller::writesRegister().

◆ isImmediate()

bool TTAProgram::Terminal::isImmediate ( ) const
virtual

Tells whether the terminal is an inline immediate value.

Returns
True if the terminal is an inline immediate value.

Reimplemented in TTAProgram::TerminalImmediate.

Definition at line 63 of file Terminal.cc.

63 {
64 return false;
65}

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().

◆ isImmediateRegister()

bool TTAProgram::Terminal::isImmediateRegister ( ) const
virtual

Tells whether the terminal is a long immediate register.

Returns
True if the terminal is a long immediate register.

Reimplemented in TTAProgram::TerminalRegister.

Definition at line 97 of file Terminal.cc.

97 {
98 return false;
99}

Referenced by CodeCompressorPlugin::addBitsForSourceField(), OutputPSocketBroker::allAvailableResources(), IUBroker::allAvailableResources(), LoopAnalyzer::analyze(), IUResource::assign(), OutputPSocketBroker::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(), BFShareOperandLate::operator()(), BFShareOperandsLate::operator()(), BFShareOperandWithScheduled::operator()(), LoopPrologAndEpilogBuilder::optimizeProlog(), SimProgramBuilder::processInstruction(), SimProgramBuilder::processSourceTerminal(), CodeCompressorPlugin::programImmediate(), TTAProgram::ProgramWriter::terminalResource(), PostpassOperandSharer::tryRemoveOperandWrite(), CopyingDelaySlotFiller::tryToAssignNodes(), IUResource::unassign(), BFUnscheduleFromBody::unscheduleOriginal(), and BFUnscheduleMove::unscheduleOriginal().

◆ isInstructionAddress()

bool TTAProgram::Terminal::isInstructionAddress ( ) const
virtual

◆ isOpcodeSetting()

bool TTAProgram::Terminal::isOpcodeSetting ( ) const
virtual

◆ isProgramOperationReference()

bool TTAProgram::Terminal::isProgramOperationReference ( ) const
virtual

Reimplemented in TTAProgram::TerminalProgramOperation.

Definition at line 144 of file Terminal.cc.

144 {
145 return false;
146}

Referenced by ControlFlowGraph::buildMBBFromBB().

◆ isRA()

bool TTAProgram::Terminal::isRA ( ) const
virtual

◆ isTriggering()

bool TTAProgram::Terminal::isTriggering ( ) const
virtual

◆ isUniversalMachineRegister()

bool TTAProgram::Terminal::isUniversalMachineRegister ( ) const
virtual

Tells whether the terminal is a reg in UniversalMachine

Returns
True if the terminal is a register in universalmachine, ie. not in any real machine. This practically means the register is unallocated and meant to be bypassed.

Reimplemented in TTAProgram::TerminalRegister.

Definition at line 166 of file Terminal.cc.

166 {
167 return false;
168}

Referenced by BF2Scheduler::isDestinationUniversalReg(), BF2Scheduler::isSourceUniversalReg(), and BUMoveNodeSelector::mightBeReady().

◆ operation()

Operation & TTAProgram::Terminal::operation ( ) const
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.

Exceptions
WrongSubclassIf the terminal is of the wrong type.
InvalidDataIf the terminal is of the right type, but it does not carry an operation-code.
Returns
The operation carried by this terminal.

Reimplemented in TTAProgram::TerminalFUPort.

Definition at line 319 of file Terminal.cc.

319 {
320 throw WrongSubclass(
321 __FILE__, __LINE__, __func__,
322 "Terminal must be TerminalFUPort for this method.");
323}

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().

◆ operationIndex()

int TTAProgram::Terminal::operationIndex ( ) const
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.

Returns
The index that identifies the operation input or output that is represented by this terminal.
Exceptions
WrongSubclassIf the terminal is of the wrong type.
InvalidDataIf 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.

364 {
365 throw WrongSubclass(
366 __FILE__, __LINE__, __func__,
367 "Terminal must be TerminalFUPort for this method.");
368}

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(), BFDropPreShared::operator()(), BFLateBypassGuard::operator()(), BFShareOperand::operator()(), BFShareOperands::operator()(), BFShareOperandWithScheduled::operator()(), BFEarlyGuardBypass::operator()(), ProgramOperation::outputIndexOfMove(), BF2ScheduleFront::prefResultCycle(), ProgramOperation::removeInputNode(), ProgramOperation::removeOutputNode(), ExecutionPipelineResource::resultCausesTriggerBetweenOperandSharing(), ExecutionPipelineResource::resultPort(), ProgramOperation::switchInputs(), ExecutionPipelineResource::testTriggerResult(), ExecutionPipelineResource::triggerTooEarly(), PreOptimizer::tryToRemoveEq(), BasicBlockScheduler::tryToSwitchInputs(), and BUBasicBlockScheduler::tryToSwitchInputs().

◆ operator==()

bool TTAProgram::Terminal::operator== ( const Terminal other) const

Comparison operator for Terminals.

Delegates the comparison to dynamically bound equals() method.

Parameters
otherComparison target.
Returns
True in case the objects are equal.

Definition at line 417 of file Terminal.cc.

417 {
418 return equals(other);
419}
virtual bool equals(const Terminal &other) const =0

References equals().

Here is the call graph for this function:

◆ port()

const Port & TTAProgram::Terminal::port ( ) const
virtual

Return the port accessed by this terminal.

Returns
The port of the unit of the terminal.
Exceptions
WrongSubclassif 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.

378 {
379 throw WrongSubclass(__FILE__, __LINE__);
380}

Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), ProximMachineStateWindow::addMoves(), BusBroker::allAvailableResources(), InputPSocketBroker::allAvailableResources(), OutputPSocketBroker::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().

◆ registerFile()

const RegisterFile & TTAProgram::Terminal::registerFile ( ) const
virtual

Returns the register file of the general-purpose register.

Applicable only if the unit of the terminal is an instance of RegisterFile.

Returns
The register file of the general-purpose register.
Exceptions
WrongSubclassif the unit of the terminal is not an instance of RegisterFile.

Reimplemented in TTAProgram::TerminalRegister.

Definition at line 225 of file Terminal.cc.

225 {
226 throw WrongSubclass(__FILE__, __LINE__);
227}

Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), 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(), BasicBlockScheduler::scheduleResultReadTempMoves(), BUBasicBlockScheduler::scheduleResultReadTempMoves(), BasicBlockScheduler::scheduleRRTempMoves(), BUBasicBlockScheduler::scheduleRRTempMoves(), DataDependenceGraph::sourceRenamed(), TTAProgram::CodeGenerator::storeTerminal(), TTAProgram::ProgramWriter::terminalResource(), PostpassOperandSharer::tryRemoveOperandWrite(), PreOptimizer::tryToOptimizeAddressReg(), and BFRenameLiveRange::undoSetTerminal().

◆ setIndex()

void TTAProgram::Terminal::setIndex ( int  index)
virtual

Change the register of the register file to the given index.

Parameters
indexThe new register index.
Exceptions
OutOfRangeif index is not smaller than the size of the register file or immediate unit it belongs to.
WrongSubclassif the terminal is not an instance of TerminalRegister.

Reimplemented in TTAProgram::TerminalRegister.

Definition at line 392 of file Terminal.cc.

392 {
393 throw WrongSubclass(__FILE__, __LINE__);
394}

◆ setInstructionReference()

void TTAProgram::Terminal::setInstructionReference ( InstructionReference  ref)
virtual

Set a new referred instruction.

Parameters
refThe new instruction reference.
Exceptions
WrongSubclassif the terminal is not an instance of TerminalInstructionAddress

Reimplemented in TTAProgram::TerminalInstructionReference.

Definition at line 404 of file Terminal.cc.

404 {
405 throw WrongSubclass(__FILE__, __LINE__);
406}

Referenced by llvm::LLVMTCEBuilder::doFinalization(), TTAProgram::Program::fixInstructionReferences(), and LoopPrologAndEpilogBuilder::moveJumpDestination().

◆ toString()

virtual TCEString TTAProgram::Terminal::toString ( ) const
pure virtual

◆ value()

SimValue TTAProgram::Terminal::value ( ) const
virtual

Returns the value of the inline immediate.

Returns
The value of the inline immediate.
Exceptions
WrongSubclassif the terminal is not an instance of TerminalImmediate.

Reimplemented in TTAProgram::TerminalBasicBlockReference, TTAProgram::TerminalImmediate, TTAProgram::TerminalInstructionAddress, TTAProgram::TerminalLaneIDImmediate, and TTAProgram::TerminalSymbolReference.

Definition at line 178 of file Terminal.cc.

178 {
179 throw WrongSubclass(__FILE__, __LINE__);
180}

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().


The documentation for this class was generated from the following files: