OpenASIP
2.0
|
#include <MachineConnectivityCheck.hh>
Public Types | |
typedef std::set< const TTAMachine::Port *, const TTAMachine::MachinePart::Comparator > | PortSet |
typedef std::set< TTAMachine::Bus *, const TTAMachine::MachinePart::Comparator > | BusSet |
typedef std::set< const TTAMachine::FunctionUnit *, const TTAMachine::MachinePart::Comparator > | FUSet |
Public Member Functions | |
virtual bool | check (const TTAMachine::Machine &mach, MachineCheckResults &results) const |
MachineConnectivityCheck () | |
virtual | ~MachineConnectivityCheck () |
Protected Member Functions | |
MachineConnectivityCheck (const std::string &shortDesc_) | |
Private Types | |
typedef std::pair< const TTAMachine::Port *, const TTAMachine::Port * > | PortPortPair |
typedef std::pair< const TTAMachine::BaseRegisterFile *, const TTAMachine::BaseRegisterFile * > | RfRfPair |
typedef std::pair< const TTAMachine::BaseRegisterFile *, const TTAMachine::Port * > | RfPortPair |
typedef std::pair< const TTAMachine::Port *, const TTAMachine::BaseRegisterFile * > | PortRfPair |
typedef std::map< PortPortPair, bool > | PortPortBoolMap |
typedef std::map< RfRfPair, bool > | RfRfBoolMap |
typedef std::map< RfPortPair, bool > | RfPortBoolMap |
typedef std::map< PortRfPair, bool > | PortRfBoolMap |
Static Private Attributes | |
static PortPortBoolMap | portPortCache_ |
static RfRfBoolMap | rfRfCache_ |
static RfPortBoolMap | rfPortCache_ |
static PortRfBoolMap | portRfCache_ |
Additional Inherited Members | |
Private Member Functions inherited from MachineCheck | |
virtual std::string | shortDescription () const |
virtual std::string | description () const |
virtual bool | canFix (const TTAMachine::Machine &mach) const |
virtual std::string | fix (TTAMachine::Machine &mach) const |
virtual | ~MachineCheck () |
MachineCheck (const std::string &shortDesc_) | |
Base class for machine interconnection connectivity checks.
Provides helper functions that are useful for many derived checks.
Definition at line 69 of file MachineConnectivityCheck.hh.
typedef std::set<TTAMachine::Bus*, const TTAMachine::MachinePart::Comparator> MachineConnectivityCheck::BusSet |
Definition at line 74 of file MachineConnectivityCheck.hh.
typedef std::set<const TTAMachine::FunctionUnit*, const TTAMachine::MachinePart::Comparator> MachineConnectivityCheck::FUSet |
Definition at line 76 of file MachineConnectivityCheck.hh.
|
private |
Definition at line 314 of file MachineConnectivityCheck.hh.
|
private |
Definition at line 303 of file MachineConnectivityCheck.hh.
|
private |
Definition at line 317 of file MachineConnectivityCheck.hh.
|
private |
Definition at line 312 of file MachineConnectivityCheck.hh.
typedef std::set<const TTAMachine::Port*, const TTAMachine::MachinePart::Comparator> MachineConnectivityCheck::PortSet |
Definition at line 72 of file MachineConnectivityCheck.hh.
|
private |
Definition at line 316 of file MachineConnectivityCheck.hh.
|
private |
Definition at line 309 of file MachineConnectivityCheck.hh.
|
private |
Definition at line 315 of file MachineConnectivityCheck.hh.
|
private |
Definition at line 306 of file MachineConnectivityCheck.hh.
MachineConnectivityCheck::MachineConnectivityCheck | ( | ) |
Constructor for using this generic class directly.
Definition at line 67 of file MachineConnectivityCheck.cc.
|
virtual |
|
protected |
Constructor for deriving.
shortDesc | The short description of the check. |
Definition at line 82 of file MachineConnectivityCheck.cc.
|
static |
Definition at line 1856 of file MachineConnectivityCheck.cc.
References TTAProgram::AnnotatedInstructionElement::annotation(), TTAProgram::AnnotatedInstructionElement::annotationCount(), and TTAProgram::ProgramAnnotation::stringValue().
Referenced by OutputFUBroker::allAvailableResources(), InputFUBroker::allAvailableResources(), busConnectedToAnyFU(), findPossibleDestinationPorts(), and findPossibleSourcePorts().
|
static |
Appends destination buses connected to a given (output) port.
port | The port to check |
buses | Set where the connected buses are appended. |
Definition at line 818 of file MachineConnectivityCheck.cc.
References TTAMachine::Port::outputSocket(), TTAMachine::Segment::parentBus(), TTAMachine::Socket::segment(), and TTAMachine::Socket::segmentCount().
Referenced by appendConnectedDestinationBuses(), MachineInfo::canEncodeImmediateInteger(), connectedDestinationBuses(), fromRfConnected(), isConnected(), isConnectedWithBothGuards(), and isEquallyConnected().
|
static |
Appends destination buses connected to a given unit.
Destination buses are the buses the unit can write data to.
unit | The unit to check |
buses | Set where the connected buses are appended. |
Definition at line 857 of file MachineConnectivityCheck.cc.
References appendConnectedDestinationBuses(), TTAMachine::Unit::port(), and TTAMachine::Unit::portCount().
|
static |
Appends source buses connected to a given (input) port.
port | The port to check |
buses | Set where the connected buses are appended. |
Definition at line 799 of file MachineConnectivityCheck.cc.
References TTAMachine::Port::inputSocket(), TTAMachine::Segment::parentBus(), TTAMachine::Socket::segment(), and TTAMachine::Socket::segmentCount().
Referenced by appendConnectedSourceBuses(), canTransportImmediate(), connectedSourceBuses(), immBits(), isConnected(), isConnectedWithBothGuards(), isEquallyConnected(), BFEarlyGuardBypass::operator()(), and toRfConnected().
|
static |
Appends source buses connected to a given unit.
Source buses are the buses the unit can read data from.
unit | The unit to check |
buses | Set where the connected buses are appended. |
Definition at line 839 of file MachineConnectivityCheck.cc.
References appendConnectedSourceBuses(), TTAMachine::Unit::port(), and TTAMachine::Unit::portCount().
|
static |
Definition at line 1341 of file MachineConnectivityCheck.cc.
References addAnnotatedFUs(), TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_DST, TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_DST, assert, busConnectedToFU(), AssocTools::containsKey(), TTAMachine::Machine::controlUnit(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAProgram::Move::destination(), MoveNode::destinationOperation(), TTAMachine::Machine::functionUnitNavigator(), TTAProgram::Terminal::hintOperation(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::machine(), MoveNode::move(), TTAMachine::Component::name(), Operation::name(), TTAProgram::TerminalFUPort::operationIndex(), ProgramOperation::scheduledFU(), and StringTools::stringToLower().
Referenced by busConnectedToDestination().
|
static |
Definition at line 1433 of file MachineConnectivityCheck.cc.
References busConnectedToAnyFU(), busConnectedToPort(), busConnectedToRF(), TTAMachine::Machine::controlUnit(), TTAProgram::Move::destination(), TTAProgram::Terminal::isFUPort(), TTAProgram::Terminal::isGPR(), TTAProgram::Terminal::isRA(), TTAMachine::Component::machine(), MoveNode::move(), TTAMachine::Port::parentUnit(), TTAProgram::Terminal::port(), and TTAMachine::ControlUnit::returnAddressPort().
Referenced by BusBroker::canTransportImmediate().
|
static |
Definition at line 1319 of file MachineConnectivityCheck.cc.
References __func__, busConnectedToPort(), TTAMachine::FunctionUnit::hasOperationLowercase(), TTAMachine::FunctionUnit::operationLowercase(), and TTAMachine::HWOperation::port().
Referenced by busConnectedToAnyFU().
|
static |
Definition at line 1290 of file MachineConnectivityCheck.cc.
References TTAMachine::Port::inputSocket(), TTAMachine::Segment::parentBus(), TTAMachine::Socket::segment(), and TTAMachine::Socket::segmentCount().
Referenced by busConnectedToDestination(), busConnectedToFU(), busConnectedToRF(), MachineInfo::supportsBoolRegisterGuardedJumps(), MachineInfo::supportsPortGuardedJump(), and MachineInfo::supportsPortGuardedJumps().
|
static |
Returns true if bus is connected to the RF's any writing port.
Definition at line 1306 of file MachineConnectivityCheck.cc.
References busConnectedToPort(), TTAMachine::Unit::port(), and TTAMachine::Unit::portCount().
Referenced by busConnectedToDestination().
|
static |
Definition at line 1830 of file MachineConnectivityCheck.cc.
References findPossibleDestinationPorts(), and isConnected().
Referenced by RegisterRenamer::findConnectedRFs(), and BF2Scheduler::possibleTempRegRFs().
|
static |
Definition at line 1789 of file MachineConnectivityCheck.cc.
References canTransportImmediate(), findPossibleDestinationPorts(), findPossibleSourcePorts(), TTAProgram::MoveGuard::guard(), TTAProgram::Move::guard(), isConnected(), MoveNode::isSourceConstant(), TTAProgram::Move::isUnconditional(), MoveNode::move(), and TTAProgram::Move::source().
Referenced by BFEarlyBypasser::operator()().
|
static |
Definition at line 2075 of file MachineConnectivityCheck.cc.
References findPossibleDestinationPorts(), TTAMachine::Machine::functionUnitNavigator(), TTAProgram::MoveGuard::guard(), TTAProgram::Move::guard(), isConnected(), TTAProgram::Move::isUnconditional(), MoveNode::move(), and TTAMachine::HWOperation::port().
|
static |
1 = can write 0 = cannot write -1 = can write through limm
Definition at line 1754 of file MachineConnectivityCheck.cc.
References canTransportImmediate(), findPossibleSourcePorts(), TTAProgram::MoveGuard::guard(), TTAProgram::Move::guard(), isConnected(), MoveNode::isSourceConstant(), TTAProgram::Move::isUnconditional(), MoveNode::move(), and TTAProgram::Move::source().
Referenced by canTransportMove(), copyOpFUs(), BUBasicBlockScheduler::findBypassDestinations(), RegisterRenamer::findConnectedRFs(), BFLateBypasses::operator()(), and BF2Scheduler::possibleTempRegRFs().
|
static |
Checks whether an immediate with given width can be transported to the destination register file.
destRF | The destination RF. |
immediate | The immediate to transport. |
Definition at line 181 of file MachineConnectivityCheck.cc.
References appendConnectedSourceBuses(), TTAMachine::Component::machine(), and requiredImmediateWidth().
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), canBypass(), canSourceWriteToAnyDestinationPort(), canTransportImmediate(), and BFOptimization::immCountPreventsScheduling().
|
static |
Checks whether an immediate with given width can be transported on the bus.
immediate | The immediate to transport. |
bus | The bus. |
Definition at line 268 of file MachineConnectivityCheck.cc.
References TTAMachine::Bus::immediateWidth(), TTAMachine::Component::machine(), requiredImmediateWidth(), and TTAMachine::Bus::signExtends().
|
static |
Checks whether an immediate with given width can be transported to the destination port.
immediate | The immediate to transport. |
destinationPort | The destination port. |
Definition at line 217 of file MachineConnectivityCheck.cc.
References appendConnectedSourceBuses(), canTransportImmediate(), and TTAMachine::Bus::hasGuard().
|
static |
Definition at line 244 of file MachineConnectivityCheck.cc.
References canTransportImmediate().
|
static |
Definition at line 1843 of file MachineConnectivityCheck.cc.
References canSourceWriteToAnyDestinationPort(), findPossibleDestinationPorts(), and machine.
Referenced by BFOptimization::canBeScheduled(), and BFTryRemoveGuard::operator()().
|
static |
Checks if there is a way to write immediate directly from bus or from immu to the given port
port | Port where to check immediate write ability. |
First check if there is a bus that can transfer the immediates
Definition at line 1191 of file MachineConnectivityCheck.cc.
References TTAMachine::Machine::Navigator< ComponentType >::count(), immBits(), TTAMachine::Machine::immediateUnitNavigator(), TTAMachine::Bus::immediateWidth(), TTAMachine::Port::inputSocket(), isConnected(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::Component::machine(), TTAMachine::Segment::parentBus(), TTAMachine::Port::parentUnit(), TTAMachine::Socket::segment(), TTAMachine::Socket::segmentCount(), TTAMachine::ImmediateUnit::signExtends(), TTAMachine::BaseRegisterFile::width(), and TTAMachine::Port::width().
Referenced by needsRegisterCopiesDueImmediateOperands().
|
virtual |
Dummy implementation for the pure virtual method MachineCheck::check().
The implementation is needed for generation of Python bindings, as Boost.Python cannot create instances of abstract base classes.
Implements MachineCheck.
Definition at line 115 of file MachineConnectivityCheck.cc.
References assert.
|
static |
Returns all buses the given port can write to
port | The port to check. |
Definition at line 784 of file MachineConnectivityCheck.cc.
References appendConnectedDestinationBuses().
Referenced by immBits(), isConnected(), and toRfConnected().
|
static |
Returns all buses the given port can read from.
port | The port to check. |
Definition at line 769 of file MachineConnectivityCheck.cc.
References appendConnectedSourceBuses().
Referenced by ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), fromRfConnected(), and isConnected().
|
static |
Find FU which has copy op that can be used to schedule this move.
Prioritizes FUs which can schedule the move directly with one copy op. If none found, then fives FU which has copy op and can recursively be used with later copy. If none found at all, returns empty set.
Definition at line 2040 of file MachineConnectivityCheck.cc.
References canSourceWriteToAnyDestinationPort(), findPossibleDestinationPorts(), TTAMachine::Machine::functionUnitNavigator(), TTAProgram::MoveGuard::guard(), TTAProgram::Move::guard(), isConnected(), TTAProgram::Move::isUnconditional(), MoveNode::move(), and TTAMachine::HWOperation::port().
Referenced by BFScheduleBU::operator()().
|
static |
Definition at line 1474 of file MachineConnectivityCheck.cc.
References addAnnotatedFUs(), TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_DST, TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_DST, assert, AssocTools::containsKey(), TTAMachine::Machine::controlUnit(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAProgram::Move::destination(), MoveNode::destinationOperation(), findWritePorts(), TTAMachine::Machine::functionUnitNavigator(), TTAProgram::MoveGuard::guard(), TTAProgram::Move::guard(), MoveNode::guardOperation(), TTAMachine::FunctionUnit::hasOperation(), ProgramOperation::inputMove(), ProgramOperation::inputMoveCount(), SetTools::intersection(), ProgramOperation::isAnyNodeAssigned(), MoveNode::isDestinationOperation(), TTAProgram::Terminal::isGPR(), MoveNode::isGuardOperation(), TTAProgram::Terminal::isRA(), MoveNode::isScheduled(), MoveNode::isSourceOperation(), TTAMachine::Machine::Navigator< ComponentType >::item(), MoveNode::move(), TTAMachine::Component::name(), Operation::name(), TTAMachine::FunctionUnit::operation(), ProgramOperation::operation(), TTAProgram::Terminal::operationIndex(), ProgramOperation::outputMove(), ProgramOperation::outputMoveCount(), TTAMachine::BaseFUPort::parentUnit(), TTAMachine::Port::parentUnit(), TTAMachine::HWOperation::port(), TTAProgram::Terminal::port(), TTAMachine::PortGuard::port(), TTAMachine::ControlUnit::returnAddressPort(), TTAProgram::Move::source(), MoveNode::sourceOperation(), and MoveNode::toString().
Referenced by canAnyPortWriteToDestination(), canBypass(), canBypassOpToDst(), canTransportMove(), copyOpFUs(), and BFEarlyGuardBypass::operator()().
|
static |
Definition at line 1673 of file MachineConnectivityCheck.cc.
References addAnnotatedFUs(), TTAProgram::ProgramAnnotation::ANN_ALLOWED_UNIT_SRC, TTAProgram::ProgramAnnotation::ANN_CONN_CANDIDATE_UNIT_SRC, assert, AssocTools::containsKey(), TTAMachine::Machine::controlUnit(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::ImmediateUnit::extensionMode(), findReadPorts(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::FunctionUnit::hasOperation(), TTAMachine::Machine::immediateUnitNavigator(), TTAMachine::Port::isOutput(), TTAProgram::Terminal::isRA(), MoveNode::isScheduled(), MoveNode::isSourceConstant(), MoveNode::isSourceOperation(), MoveNode::isSourceVariable(), TTAMachine::Machine::Navigator< ComponentType >::item(), MoveNode::move(), TTAMachine::Component::name(), Operation::name(), TTAMachine::FunctionUnit::operation(), ProgramOperation::operation(), TTAProgram::Terminal::operationIndex(), TTAMachine::Port::parentUnit(), TTAMachine::BaseRegisterFile::port(), TTAMachine::HWOperation::port(), TTAProgram::Terminal::port(), TTAMachine::Unit::portCount(), requiredImmediateWidth(), TTAMachine::ControlUnit::returnAddressPort(), TTAProgram::Move::source(), MoveNode::sourceOperation(), and TTAMachine::BaseRegisterFile::width().
Referenced by canBypass(), and canSourceWriteToAnyDestinationPort().
|
static |
Definition at line 1601 of file MachineConnectivityCheck.cc.
References TTAMachine::Port::isOutput(), TTAMachine::Unit::port(), and TTAMachine::Unit::portCount().
Referenced by RegisterRenamer::findConnectedRFs(), findPossibleSourcePorts(), and BF2Scheduler::possibleTempRegRFs().
|
static |
Returns busses that connects the given ports.
Definition at line 1658 of file MachineConnectivityCheck.cc.
References TTAMachine::Machine::busNavigator(), isConnected(), TTAMachine::Component::machine(), and TTAMachine::Port::parentUnit().
|
static |
Definition at line 1589 of file MachineConnectivityCheck.cc.
References TTAMachine::Port::isInput(), TTAMachine::Unit::port(), and TTAMachine::Unit::portCount().
Referenced by RegisterRenamer::findConnectedRFs(), findPossibleDestinationPorts(), and BF2Scheduler::possibleTempRegRFs().
|
static |
Checks whether there is a connection from the given Register file or Immediate unit to all FU's and control unit of the machine.
It both this and toRfConnected() returns true, then this FU can be used as the only register file to be used for reduced connectivity-register copying.
brf | Register file or immediate unit being checked. |
Definition at line 502 of file MachineConnectivityCheck.cc.
References appendConnectedDestinationBuses(), connectedSourceBuses(), TTAMachine::Machine::controlUnit(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::Port::inputSocket(), SetTools::intersection(), isPortApplicableToWidths(), TTAMachine::Component::machine(), TTAMachine::Port::outputSocket(), TTAMachine::BaseRegisterFile::port(), TTAMachine::FunctionUnit::port(), TTAMachine::Unit::portCount(), and TTAMachine::BaseRegisterFile::width().
Referenced by rfConnected().
|
static |
Definition at line 1983 of file MachineConnectivityCheck.cc.
References TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), TTAMachine::Guard::isInverted(), TTAMachine::RegisterGuard::registerFile(), and TTAMachine::RegisterGuard::registerIndex().
Referenced by isConnectedWithBothGuards().
|
static |
Definition at line 1876 of file MachineConnectivityCheck.cc.
References TTAMachine::Machine::busNavigator(), AssocTools::containsKey(), TTAMachine::Machine::Navigator< ComponentType >::count(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), isConnectedWithBothGuards(), TTAMachine::Machine::Navigator< ComponentType >::item(), TTAMachine::RegisterGuard::registerFile(), TTAMachine::Machine::registerFileNavigator(), TTAMachine::RegisterGuard::registerIndex(), and TTAMachine::BaseRegisterFile::width().
Referenced by TDGen::TDGen().
|
static |
Definition at line 594 of file MachineConnectivityCheck.cc.
References TTAMachine::Machine::busNavigator(), and shortImmBits().
|
static |
Definition at line 620 of file MachineConnectivityCheck.cc.
References appendConnectedSourceBuses(), connectedDestinationBuses(), SetTools::intersection(), TTAMachine::Component::machine(), TTAMachine::Port::outputSocket(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), and shortImmBits().
Referenced by canWriteAllImmediates(), shortImmBits(), and toRfConnected().
|
static |
Returns true if all ports are connected to the bus.
Definition at line 1644 of file MachineConnectivityCheck.cc.
References isConnected().
|
static |
Checks whether there is a connection from some outport port of a register file or immediate unit into some input port of the given target register file or immediate unit.
sourceRF | Source RF/Immediate unit. |
destRF | Source RF/Immediate unit. |
Definition at line 334 of file MachineConnectivityCheck.cc.
References appendConnectedDestinationBuses(), appendConnectedSourceBuses(), SetTools::intersection(), and rfRfCache_.
|
static |
Checks whether there is a connection from some outport port of a register file or immediate unit into some input port of the given target function unit.
sourceRF | Source RF/Immediate unit. |
destFU | Destination FU. |
Definition at line 384 of file MachineConnectivityCheck.cc.
References appendConnectedDestinationBuses(), appendConnectedSourceBuses(), and SetTools::intersection().
|
static |
Checks whether there is a connection from some outport port of a register file or immediate unit into the specified port.
sourceRF | Source RF/Immediate unit. |
destPort | The destination port. |
Definition at line 292 of file MachineConnectivityCheck.cc.
References appendConnectedDestinationBuses(), connectedSourceBuses(), SetTools::intersection(), TTAMachine::Port::outputSocket(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), and rfPortCache_.
|
static |
Returns true if there is connection between the port and the bus.
Definition at line 1616 of file MachineConnectivityCheck.cc.
References TTAMachine::Port::inputSocket(), and TTAMachine::Port::outputSocket().
|
static |
Returns true if there is connection between the port and the bus.
Definition at line 1634 of file MachineConnectivityCheck.cc.
References isConnected().
|
static |
Checks whether there is a connection between two ports.
sourcePort | The source (rf/fu) port. |
destinationPort | The destination (rf/fu) port. |
Definition at line 128 of file MachineConnectivityCheck.cc.
References appendConnectedDestinationBuses(), appendConnectedSourceBuses(), SetTools::intersection(), and portPortCache_.
Referenced by RegisterCopyAdder::addConnectionRegisterCopies(), RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), ImmediateAnalyzer::analyzeImmediateCapabilitiesForOperation(), canAnyPortWriteToDestination(), canBypass(), canBypassOpToDst(), canSourceWriteToAnyDestinationPort(), canWriteAllImmediates(), CopyingDelaySlotFiller::collectMoves(), copyOpFUs(), RegisterCopyAdder::countAndAddConnectionRegisterCopiesToRR(), ProGe::RV32MicroCodeGenerator::findConnectedBusses(), findRoutes(), isConnected(), isConnectedToDifferentlyConnectedRFs(), MachineAnalysis::MachineAnalysis(), BF2Scheduler::possibleTempRegRFs(), and raConnected().
|
static |
Checks whether there is a connection from specified port into some input port of a register file.
sourcePort | The source port. |
destRF | Destination register file. |
Definition at line 410 of file MachineConnectivityCheck.cc.
References appendConnectedSourceBuses(), connectedDestinationBuses(), TTAMachine::Port::inputSocket(), SetTools::intersection(), TTAMachine::BaseRegisterFile::port(), TTAMachine::Unit::portCount(), and portRfCache_.
|
static |
Definition at line 88 of file MachineConnectivityCheck.cc.
References isConnected().
|
static |
Checks if given RF is connected to differently connected RFs, to know if we need to reserve temp registers for transfers between the two RFs.
TODO: This isn't always needed: there is no need to reserve a register from an RF if it is only connected to RFs with a subset of the connectivity it offers.
Definition at line 875 of file MachineConnectivityCheck.cc.
References isConnected(), isEquallyConnected(), TTAMachine::Component::machine(), TTAMachine::Machine::registerFileNavigator(), and TTAMachine::BaseRegisterFile::width().
Referenced by tempRegisterFiles().
|
static |
Checks whether there is a connection from some outport port of a register file or immediate unit into some input port of the given target register file or immediate unit.
sourceRF | Source RF/Immediate unit. |
destRF | Source RF/Immediate unit. |
Definition at line 1946 of file MachineConnectivityCheck.cc.
References appendConnectedDestinationBuses(), appendConnectedSourceBuses(), hasBothGuards(), SetTools::intersection(), and rfRfCache_.
Referenced by hasConditionalMoves().
|
static |
Checks whether the two RFs are connected to the exact same buses.
Definition at line 447 of file MachineConnectivityCheck.cc.
References appendConnectedDestinationBuses(), and appendConnectedSourceBuses().
Referenced by isConnectedToDifferentlyConnectedRFs().
|
static |
Definition at line 463 of file MachineConnectivityCheck.cc.
References AssocTools::containsKey(), operandWidth(), OperationPool::operation(), and TTAMachine::Port::parentUnit().
Referenced by fromRfConnected(), needsRegisterCopiesDueImmediateOperands(), and toRfConnected().
|
static |
Definition at line 2009 of file MachineConnectivityCheck.cc.
References TTAMachine::Machine::immediateUnitNavigator().
Referenced by BFOptimization::immCountPreventsScheduling().
|
static |
Definition at line 2019 of file MachineConnectivityCheck.cc.
References TTAMachine::Machine::busNavigator().
Referenced by BFOptimization::immCountPreventsScheduling().
|
static |
Definition at line 904 of file MachineConnectivityCheck.cc.
References TTAMachine::Machine::functionUnitNavigator(), machine, operandWidth(), and TTAMachine::Machine::registerFileNavigator().
Referenced by tempRegisterFiles().
|
static |
Definition at line 947 of file MachineConnectivityCheck.cc.
References canWriteAllImmediates(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::Port::inputSocket(), and isPortApplicableToWidths().
Referenced by tempRegisterFiles().
|
static |
Definition at line 890 of file MachineConnectivityCheck.cc.
References __func__, NullOperation::instance(), TTAMachine::HWOperation::name(), Operation::operand(), OperationPool::operation(), and Operand::width().
Referenced by isPortApplicableToWidths(), and needRegCopiesDueReadPortConflicts().
|
static |
Definition at line 966 of file MachineConnectivityCheck.cc.
References TTAMachine::Machine::controlUnit(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::FunctionUnit::hasOperation(), isConnected(), TTAMachine::Machine::isLittleEndian(), machine, TTAMachine::FunctionUnit::operation(), TTAMachine::HWOperation::port(), TTAMachine::ControlUnit::returnAddressPort(), and Application::verboseLevel().
Referenced by tempRegisterFiles().
|
static |
Returns the bit width the immediate requires.
signExtension | Whether sign extension is used. |
source | The immediate terminal. |
Definition at line 1247 of file MachineConnectivityCheck.cc.
References TTAMachine::FunctionUnit::addressSpace(), assert, TTAMachine::Machine::controlUnit(), MachineInfo::defaultDataAddressSpace(), TTAMachine::AddressSpace::end(), TTAProgram::Terminal::isBasicBlockReference(), TTAProgram::Terminal::isCodeSymbolReference(), TTAProgram::Terminal::isInstructionAddress(), MathTools::requiredBits(), MathTools::requiredBitsSigned(), SimValue::sLongWordValue(), TTAProgram::TerminalImmediate::toString(), SimValue::uLongWordValue(), and TTAProgram::TerminalImmediate::value().
Referenced by RegisterCopyAdder::addConnectionRegisterCopiesImmediate(), IUResource::canAssign(), canTransportImmediate(), BusBroker::canTransportImmediate(), and findPossibleSourcePorts().
|
static |
Checks if an RF is connected to all other units
It this returns true, then this FU can be used as the only register file to be used for reduced connectivity-register copying.
rf | Register file to be checked. |
Definition at line 587 of file MachineConnectivityCheck.cc.
References fromRfConnected(), and toRfConnected().
Referenced by tempRegisterFiles().
|
static |
Referenced by immBits().
|
static |
Definition at line 606 of file MachineConnectivityCheck.cc.
References immBits().
|
static |
Gets all register files needed for limited connectivity temp registers
machine | machine we are checking |
Definition at line 1038 of file MachineConnectivityCheck.cc.
References AssocTools::containsKey(), TTAMachine::Machine::functionUnitNavigator(), TTAMachine::Machine::immediateUnitNavigator(), isConnectedToDifferentlyConnectedRFs(), machine, needRegCopiesDueReadPortConflicts(), needsRegisterCopiesDueImmediateOperands(), raConnected(), TTAMachine::Machine::registerFileNavigator(), rfConnected(), and Application::verboseLevel().
Referenced by RegisterCopyAdder::findTempRegisters(), BBSchedulerController::handleBasicBlock(), RegisterRenamer::initialize(), ScheduleEstimator::maximumSizeOfBB(), and TDGen::TDGen().
|
static |
Checks whether there is a connection to the given Register file from all FU's and control unit of the machine.
It both this and fromRfConnected() returns true, then this FU can be used as the only register file to be used for reduced connectivity-register copying.
brf | Register file or immediate unit being checked. |
Definition at line 674 of file MachineConnectivityCheck.cc.
References appendConnectedSourceBuses(), connectedDestinationBuses(), TTAMachine::Machine::controlUnit(), TTAMachine::Machine::functionUnitNavigator(), immBits(), TTAMachine::Machine::immediateUnitNavigator(), TTAMachine::Port::inputSocket(), SetTools::intersection(), isPortApplicableToWidths(), TTAMachine::Component::machine(), TTAMachine::Port::outputSocket(), TTAMachine::BaseRegisterFile::port(), TTAMachine::FunctionUnit::port(), TTAMachine::Unit::portCount(), TTAMachine::BaseRegisterFile::width(), and TTAMachine::Port::width().
Referenced by rfConnected().
|
static |
Definition at line 1461 of file MachineConnectivityCheck.cc.
References TTAMachine::Machine::busNavigator(), TTAMachine::Segment::connectionCount(), and TTAMachine::Machine::Navigator< ComponentType >::item().
Referenced by DSDBManager::addArchitecture(), ConnectionSweeper::explore(), ConnectionSweeper::removeAllConnections(), and ConnectionSweeper::removeLeastNecessaryConnections().
|
staticprivate |
Definition at line 319 of file MachineConnectivityCheck.hh.
Referenced by isConnected().
|
staticprivate |
Definition at line 322 of file MachineConnectivityCheck.hh.
Referenced by isConnected().
|
staticprivate |
Definition at line 321 of file MachineConnectivityCheck.hh.
Referenced by isConnected().
|
staticprivate |
Definition at line 320 of file MachineConnectivityCheck.hh.
Referenced by isConnected(), and isConnectedWithBothGuards().