Go to the documentation of this file.
33 #ifndef TTA_MACHINE_CONNECTIVITY_CHECK_HH
34 #define TTA_MACHINE_CONNECTIVITY_CHECK_HH
52 class BaseRegisterFile;
60 class TerminalImmediate;
98 std::pair<const TTAMachine::RegisterFile*,int> guardReg);
114 const std::set<TTAMachine::Port*> ports,
150 bool ignoreGuard =
false);
220 bool ignoreGuard =
false);
245 const std::set<int>& rfWidths);
251 std::set<TCEString>& candidateFUs,
264 std::pair<const TTAMachine::RegisterFile*,int> guardReg);
266 static std::set<const TTAMachine::RegisterFile*>
277 static std::pair<int, int>
280 static std::pair<int, int>
287 static std::pair<int, int>
292 std::set<const TTAMachine::Bus*>& buses,
293 std::pair<int, int>&);
302 typedef std::pair<const TTAMachine::Port*,const TTAMachine::Port*>
std::map< PortPortPair, bool > PortPortBoolMap
static PortSet findPossibleDestinationPorts(const TTAMachine::Machine &mach, const MoveNode &node)
static bool busConnectedToPort(const TTAMachine::Bus &bus, const TTAMachine::Port &port)
static int requiredImmediateWidth(bool signExtension, const TTAProgram::TerminalImmediate &source, const TTAMachine::Machine &mach)
static bool busConnectedToDestination(const TTAMachine::Bus &bus, const MoveNode &moveNode)
std::pair< const TTAMachine::Port *, const TTAMachine::Port * > PortPortPair
static PortSet findPossibleSourcePorts(const TTAMachine::Machine &mach, const MoveNode &node)
static void appendConnectedSourceBuses(const TTAMachine::Port &port, std::set< const TTAMachine::Bus * > &buses)
static bool isConnectedToDifferentlyConnectedRFs(const TTAMachine::RegisterFile &rf)
TTAMachine::Machine * machine
the architecture definition of the estimated processor
static bool isConnectedWithBothGuards(const TTAMachine::BaseRegisterFile &sourceRF, const TTAMachine::BaseRegisterFile &destRF, std::pair< const TTAMachine::RegisterFile *, int > guardReg)
std::map< RfRfPair, bool > RfRfBoolMap
static bool canTransportImmediate(const TTAProgram::TerminalImmediate &immediate, const TTAMachine::BaseRegisterFile &destRF, const TTAMachine::Guard *guard=NULL)
std::pair< const TTAMachine::BaseRegisterFile *, const TTAMachine::Port * > RfPortPair
static bool rfConnected(const TTAMachine::RegisterFile &rf)
static bool canTransportMove(const MoveNode &moveNode, const TTAMachine::Machine &machine, bool ignoreGuard=false)
static bool isEquallyConnected(const TTAMachine::BaseRegisterFile &RF1, const TTAMachine::BaseRegisterFile &RF2)
static bool hasConditionalMoves(const TTAMachine::Machine &mach, const std::set< int > &rfWidths)
static PortSet findWritePorts(const TTAMachine::Unit &rf)
Id
the ID in TPEF is 24 bits, here enum
static bool canBypass(const MoveNode &src, const MoveNode &user, const TTAMachine::Machine &targetMachine)
static std::set< const TTAMachine::RegisterFile * > needRegCopiesDueReadPortConflicts(const TTAMachine::Machine &machine)
std::pair< const TTAMachine::BaseRegisterFile *, const TTAMachine::BaseRegisterFile * > RfRfPair
static std::pair< bool, bool > hasBothGuards(const TTAMachine::Bus *bus, std::pair< const TTAMachine::RegisterFile *, int > guardReg)
static bool busConnectedToAnyFU(const TTAMachine::Bus &bus, const MoveNode &moveNode)
MachineConnectivityCheck()
static std::set< const TTAMachine::Bus * > connectedDestinationBuses(const TTAMachine::Port &port)
static void addAnnotatedFUs(std::set< TCEString > &candidateFUs, const TTAProgram::Move &m, TTAProgram::ProgramAnnotation::Id id)
static RfRfBoolMap rfRfCache_
virtual bool check(const TTAMachine::Machine &mach, MachineCheckResults &results) const
static int totalConnectionCount(const TTAMachine::Machine &mach)
static bool fromRfConnected(const TTAMachine::BaseRegisterFile &brf)
std::set< const TTAMachine::FunctionUnit *, const TTAMachine::MachinePart::Comparator > FUSet
std::pair< const TTAMachine::Port *, const TTAMachine::BaseRegisterFile * > PortRfPair
const std::string & shortDesc_
Short description of the check.
static bool isConnected(const TTAMachine::Port &sourcePort, const TTAMachine::Port &destinationPort, const TTAMachine::Guard *guard=NULL)
static int canSourceWriteToAnyDestinationPort(const MoveNode &src, PortSet &ports, bool ignoreGuard=false)
std::map< PortRfPair, bool > PortRfBoolMap
static int maxSIMMCount(const TTAMachine::Machine &targetMachine)
static PortPortBoolMap portPortCache_
static std::pair< int, int > immBits(const TTAMachine::RegisterFile &rf)
static bool raConnected(const TTAMachine::Machine &machine)
static PortSet findReadPorts(const TTAMachine::Unit &rf)
static bool busConnectedToRF(const TTAMachine::Bus &bus, const TTAMachine::Unit &destRF)
static PortRfBoolMap portRfCache_
static bool isPortApplicableToWidths(const TTAMachine::Port &port, std::set< int > widths)
static void appendConnectedDestinationBuses(const TTAMachine::Port &port, std::set< const TTAMachine::Bus * > &buses)
static bool canWriteAllImmediates(TTAMachine::Port &destPort)
static std::set< const TTAMachine::RegisterFile *, TTAMachine::MachinePart::Comparator > tempRegisterFiles(const TTAMachine::Machine &machine)
static bool canBypassOpToDst(const TTAMachine::Machine &mach, const TCEString &opName, int outIndex, const MoveNode &mn)
static bool toRfConnected(const TTAMachine::RegisterFile &brf)
static std::pair< int, int > shortImmBits(std::set< const TTAMachine::Bus * > &buses)
std::map< RfPortPair, bool > RfPortBoolMap
static BusSet findRoutes(TTAMachine::Port &port1, TTAMachine::Port &port2)
static std::set< const TTAMachine::Bus * > connectedSourceBuses(const TTAMachine::Port &port)
static RfPortBoolMap rfPortCache_
virtual ~MachineConnectivityCheck()
static bool canAnyPortWriteToDestination(PortSet &ports, const MoveNode &dest)
static FUSet copyOpFUs(const TTAMachine::Machine &mach, const MoveNode &mn)
static bool busConnectedToFU(const TTAMachine::Bus &bus, const TTAMachine::FunctionUnit &fu, const TCEString &opName, int opIndex)
static bool needsRegisterCopiesDueImmediateOperands(const TTAMachine::Machine &mach)
static int operandWidth(const TTAMachine::HWOperation &hwop, int index)
std::set< TTAMachine::Bus *, const TTAMachine::MachinePart::Comparator > BusSet
std::set< const TTAMachine::Port *, const TTAMachine::MachinePart::Comparator > PortSet
static int maxLIMMCount(const TTAMachine::Machine &targetMachine)