Go to the documentation of this file.
33 #ifndef TTA_REGISTER_RENAMER_HH
34 #define TTA_REGISTER_RENAMER_HH
50 class TerminalRegister;
72 bool allowSameRf,
bool differentRfOnlyDirectlyReachable,
73 int earliestCycle=-1);
77 bool allowSameRf,
bool differentRfOnlyDirectlyReachable,
78 int latestCycle = INT_MAX);
87 bool usedAfter,
bool loopScheduling);
90 int bitWidth,
int latestCycle)
const;
118 int bitWidth,
int earliestCycle,
137 int loopDepth)
const;
std::set< TCEString > freeGPRs_
std::set< TCEString > onlyEndPartiallyUsedRegs_
std::set< const TTAMachine::RegisterFile *, TTAMachine::MachinePart::Comparator > RegisterFileSet
void renamedToRegister(const TCEString &newReg)
void updateAntiEdgesFromLRTo(LiveRange &liveRange, const TCEString &newReg, TTAProgram::BasicBlock &bb, int loopDepth) const
TTAMachine::Machine * machine
the architecture definition of the estimated processor
std::set< TCEString > allNormalGPRs_
std::set< MoveNode *, typename MoveNode ::Comparator > NodeSet
RegisterFileSet findConnectedRFs(LiveRange &lr, bool allowLimm)
std::set< TCEString > findPartiallyUsedRegistersAfterCycle(int bitWidth, int latestCycle) const
std::set< const TTAMachine::RegisterFile *, TTAMachine::MachinePart::Comparator > tempRegFiles_
std::set< TCEString > usedGPRs_
std::set< TCEString > onlyBeginPartiallyUsedRegs_
TTAProgram::BasicBlock & bb()
std::set< TCEString > findFreeGuardRegisters(const DataDependenceGraph::NodeSet &guardUseNodes, int bitWidth, const RegisterFileSet &rfs) const
TTAProgram::BasicBlock & bb_
std::set< TCEString > findGuardRegisters(const DataDependenceGraph::NodeSet &guardMoves, const RegisterFileSet &rfs) const
void initializeFreeRegisters()
bool renameSourceRegister(MoveNode &node, bool loopScheduling, bool allowSameRf, bool differentRfOnlyDirectlyReachable, int latestCycle=INT_MAX)
static std::map< const TTAMachine::Machine *, std::set< const TTAMachine::RegisterFile *, TTAMachine::MachinePart::Comparator > > tempRegFileCache_
To avoid reanalysing machine every time hen new rr created.
std::set< TCEString > findPartiallyUsedRegistersInRFBeforeCycle(const RegisterFileSet &rfs, int earliestCycle, const DataDependenceGraph::NodeSet &guardMoves) const
RegisterRenamer(const TTAMachine::Machine &machine, TTAProgram::BasicBlock &bb)
bool renameDestinationRegister(MoveNode &node, bool loopScheduling, bool allowSameRf, bool differentRfOnlyDirectlyReachable, int earliestCycle=-1)
void setSelector(MoveNodeSelector *selector)
DataDependenceGraph * ddg_
bool renameLiveRange(LiveRange &liveRange, const TCEString &newReg, bool usedBefore, bool usedAfter, bool loopScheduling)
std::set< TCEString > findPartiallyUsedRegistersBeforeCycle(int bitWidth, int earliestCycle, const DataDependenceGraph::NodeSet &guardMoves) const
std::set< TCEString > findFreeRegistersInRF(const RegisterFileSet &rfs) const
const TTAMachine::Machine & machine_
void revertedRenameToRegister(const TCEString ®)
std::set< TCEString > onlyMidPartiallyUsedRegs_
unsigned int freeGPRCount() const
std::set< TCEString > findPartiallyUsedRegistersInRFAfterCycle(const RegisterFileSet &rfs, int latestCycle) const
std::set< TCEString > registersOfRFs(const RegisterFileSet &rfs) const
std::set< TCEString > findFreeRegisters(int bitWidth) const
MoveNodeSelector * selector_