OpenASIP
2.0
|
#include <BFRenameLiveRange.hh>
Public Member Functions | |
BFRenameLiveRange (BF2Scheduler &sched, std::shared_ptr< LiveRange > liveRange, int targetCycle) | |
virtual bool | operator() () |
virtual | ~BFRenameLiveRange () |
Public Member Functions inherited from BFOptimization | |
BFOptimization (BF2Scheduler &sched) | |
virtual bool | isFinishFront () |
virtual void | mightBeReady (MoveNode &mn) |
Public Member Functions inherited from Reversible | |
virtual void | undo () |
virtual | ~Reversible () |
void | deleteChildren (std::stack< Reversible * > &children) |
int | id () |
Reversible () | |
Protected Member Functions | |
void | undoSetTerminal () |
void | setTerminals () |
void | setGuard (TTAProgram::Move &move, const TTAMachine::RegisterFile &rf, int regIndex) |
void | setRegDefsAndLastUses () |
void | undoSetRegDefsAndLastUses () |
void | setFirstDefsAndUses () |
void | undoSetFirstDefsAndUses () |
void | setOutgoingDeps () |
void | setIncomingDeps () |
void | unsetIncomingDeps () |
void | unsetOutgoingDeps () |
void | undoNewAntiDeps () |
void | notifySelector () |
bool | renameLiveRange (class LiveRange &liveRange, const class TCEString ®, bool usedAfter) |
virtual void | undoOnlyMe () override |
Protected Member Functions inherited from BFOptimization | |
DataDependenceGraph & | ddg () |
DataDependenceGraph * | rootDDG () |
const DataDependenceGraph & | ddg () const |
DataDependenceGraph * | prologDDG () |
SimpleResourceManager & | rm () const |
SimpleResourceManager * | prologRM () const |
BUMoveNodeSelector & | selector () |
const TTAMachine::Machine & | targetMachine () const |
unsigned int | ii () const |
MoveNodeDuplicator & | duplicator () const |
virtual bool | assign (int cycle, MoveNode &, const TTAMachine::Bus *bus=nullptr, const TTAMachine::FunctionUnit *srcFU_=nullptr, const TTAMachine::FunctionUnit *dstFU=nullptr, const TTAMachine::Bus *prologBus=nullptr, int immWriteCycle=-1, int prologImmWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1, bool ignoreGuardWriteCycle=false) |
virtual void | unassign (MoveNode &mn, bool disposePrologCopy=true) |
virtual int | rmEC (int cycle, MoveNode &mn, const TTAMachine::Bus *bus=nullptr, const TTAMachine::FunctionUnit *srcFU=nullptr, const TTAMachine::FunctionUnit *dstFU=nullptr, const TTAMachine::Bus *prologBus=nullptr, int immWriteCycle=-1, int prologImmWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) |
virtual int | rmLC (int cycle, MoveNode &mn, const TTAMachine::Bus *bus=nullptr, const TTAMachine::FunctionUnit *srcFU=nullptr, const TTAMachine::FunctionUnit *dstFU=nullptr, const TTAMachine::Bus *prologBus=nullptr, int immWriteCycle=-1, int prologImmWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1) |
virtual bool | canAssign (int cycle, MoveNode &mn, const TTAMachine::Bus *bus=nullptr, const TTAMachine::FunctionUnit *srcFU=nullptr, const TTAMachine::FunctionUnit *dstFU=nullptr, const TTAMachine::Bus *prologBus=nullptr, int immWriteCycle=-1, int prologImmWriteCycle=-1, const TTAMachine::ImmediateUnit *immu=nullptr, int immRegIndex=-1, bool ignoreGWN=false) |
bool | putAlsoToPrologEpilog (int cycle, MoveNode &mn) |
void | setPrologSrcFUAnno (MoveNode &prologMN, MoveNode &loopMN) |
void | setPrologDstFUAnno (MoveNode &prologMN, MoveNode &loopMN) |
void | setJumpGuard (MoveNode &mn) |
void | unsetJumpGuard (MoveNode &mn) |
bool | needJumpGuard (const MoveNode &mn, int cycle) |
int | jumpGuardAvailableCycle (const MoveNode &mn) |
bool | canBeSpeculated (const Operation &op) |
bool | canBeSpeculated (const MoveNode &mn) |
bool | usePrologMove (const MoveNode &mn) |
bool | canBeScheduled (const MoveNode &mn) |
const TTAMachine::RegisterFile * | RFReadPortCountPreventsScheduling (const MoveNode &mn) |
bool | immCountPreventsScheduling (const MoveNode &mn) |
Protected Member Functions inherited from Reversible | |
bool | runPreChild (Reversible *preChild) |
bool | runPostChild (Reversible *preChild) |
bool | runChild (std::stack< Reversible * > &children, Reversible *child) |
bool | runChild (Reversible *child, bool pre) |
void | undoAndRemovePreChildren () |
void | undoAndRemovePostChildren () |
void | undoAndRemoveChildren (std::stack< Reversible * > &children) |
Protected Attributes | |
DataDependenceGraph::UndoData | undoWriteUpdateData_ |
std::map< const MoveNode *, DataDependenceGraph::UndoData, MoveNode::Comparator > | undoReadUpdateData_ |
class TTAProgram::Terminal * | oldReg_ |
std::shared_ptr< LiveRange > | liveRange_ |
TTAProgram::BasicBlock * | bb_ |
TCEString | newReg_ |
MoveNodeUse | oldLastKill_ |
MoveNodeUse | oldKill_ |
int | targetCycle_ |
LiveRangeData::MoveNodeUseSet | oldRegDefines_ |
LiveRangeData::MoveNodeUseSet | oldRegFirstDefines_ |
LiveRangeData::MoveNodeUseSet | oldRegFirstUses_ |
DataDependenceGraph::EdgeSet | createdAntidepEdges_ |
Protected Attributes inherited from BFOptimization | |
BF2Scheduler & | sched_ |
Protected Attributes inherited from Reversible | |
std::stack< Reversible * > | preChildren_ |
std::stack< Reversible * > | postChildren_ |
Additional Inherited Members | |
Static Public Member Functions inherited from BFOptimization | |
static void | clearPrologMoves () |
static MoveNode * | getSisterTrigger (const MoveNode &mn, const TTAMachine::Machine &mach) |
Static Protected Attributes inherited from BFOptimization | |
static std::map< MoveNode *, MoveNode *, MoveNode::Comparator > | prologMoves_ |
Definition at line 45 of file BFRenameLiveRange.hh.
BFRenameLiveRange::BFRenameLiveRange | ( | BF2Scheduler & | sched, |
std::shared_ptr< LiveRange > | liveRange, | ||
int | targetCycle | ||
) |
Definition at line 52 of file BFRenameLiveRange.cc.
|
virtual |
Definition at line 478 of file BFRenameLiveRange.cc.
References oldReg_.
|
protected |
Definition at line 419 of file BFRenameLiveRange.cc.
References BF2Scheduler::currentFront(), BFOptimization::ddg(), liveRange_, BF2ScheduleFront::mightBeReady(), BoostGraph< GraphNode, GraphEdge >::predecessors(), BFOptimization::sched_, and BoostGraph< GraphNode, GraphEdge >::successors().
Referenced by renameLiveRange().
|
virtual |
This performs the operation. Returns true if success, false if fail.
Implements Reversible.
Definition at line 60 of file BFRenameLiveRange.cc.
References assert, RegisterRenamer::bb(), bb_, RegisterRenamer::findConnectedRFs(), RegisterRenamer::findFreeRegistersInRF(), RegisterRenamer::findPartiallyUsedRegistersInRFAfterCycle(), BFOptimization::ii(), liveRange_, renameLiveRange(), BF2Scheduler::renamer(), BFOptimization::sched_, and targetCycle_.
|
protected |
Definition at line 319 of file BFRenameLiveRange.cc.
References assert, bb_, BoostGraph< GraphNode, GraphEdge >::connectNodes(), TTAProgram::Terminal::copy(), createdAntidepEdges_, BFOptimization::ddg(), DataDependenceEdge::DEP_WAR, DataDependenceEdge::DEP_WAW, DataDependenceGraph::destRenamed(), DataDependenceEdge::EDGE_REGISTER, DataDependenceGraph::firstScheduledRegisterWrites(), DataDependenceGraph::guardRenamed(), TTAMachine::Machine::Navigator< ComponentType >::item(), liveRange_, newReg_, notifySelector(), oldReg_, LiveRange::reads, TTAMachine::Machine::registerFileNavigator(), RegisterRenamer::renamedToRegister(), BF2Scheduler::renamer(), BFOptimization::sched_, setFirstDefsAndUses(), setIncomingDeps(), setOutgoingDeps(), setRegDefsAndLastUses(), setTerminals(), DataDependenceGraph::sourceRenamed(), BFOptimization::targetMachine(), undoReadUpdateData_, undoWriteUpdateData_, and LiveRange::writes.
Referenced by operator()().
|
protected |
Definition at line 263 of file BFRenameLiveRange.cc.
References bb_, liveRange_, TTAProgram::BasicBlock::liveRangeData_, newReg_, LiveRangeData::regFirstDefines_, and LiveRangeData::regFirstUses_.
Referenced by renameLiveRange().
|
protected |
Definition at line 117 of file BFRenameLiveRange.cc.
References TTAProgram::MoveGuard::guard(), TTAProgram::Move::guard(), TTAMachine::Bus::guard(), TTAMachine::Bus::guardCount(), TTAMachine::Guard::isInverted(), TTAMachine::Guard::parentBus(), TTAMachine::RegisterGuard::registerFile(), TTAMachine::RegisterGuard::registerIndex(), and TTAProgram::Move::setGuard().
Referenced by setTerminals(), and undoSetTerminal().
|
protected |
Definition at line 186 of file BFRenameLiveRange.cc.
References bb_, liveRange_, TTAProgram::BasicBlock::liveRangeData_, newReg_, oldKill_, oldRegFirstDefines_, oldRegFirstUses_, LiveRangeData::regFirstDefines_, LiveRangeData::regFirstUses_, and LiveRangeData::regKills_.
Referenced by renameLiveRange().
|
protected |
Definition at line 207 of file BFRenameLiveRange.cc.
References bb_, liveRange_, TTAProgram::BasicBlock::liveRangeData_, newReg_, oldLastKill_, oldRegDefines_, LiveRangeData::regDefines_, and LiveRangeData::regLastKills_.
Referenced by renameLiveRange().
|
protected |
Definition at line 222 of file BFRenameLiveRange.cc.
References bb_, liveRange_, TTAProgram::BasicBlock::liveRangeData_, newReg_, LiveRangeData::regDefines_, and LiveRangeData::regLastUses_.
Referenced by renameLiveRange().
|
protected |
Definition at line 89 of file BFRenameLiveRange.cc.
References TTAMachine::RegisterFile::firstReadPort(), TTAMachine::RegisterFile::firstWritePort(), TTAMachine::Machine::Navigator< ComponentType >::item(), liveRange_, newReg_, TTAMachine::Machine::registerFileNavigator(), TTAProgram::Move::setDestination(), setGuard(), TTAProgram::Move::setSource(), and BFOptimization::targetMachine().
Referenced by renameLiveRange().
|
protected |
Definition at line 179 of file BFRenameLiveRange.cc.
References createdAntidepEdges_, BFOptimization::ddg(), and BoostGraph< GraphNode, GraphEdge >::removeEdge().
Referenced by undoOnlyMe().
|
overrideprotectedvirtual |
Undoes the operations done by this class but not children. This method should be overloaded by most derived classes.
Reimplemented from Reversible.
Definition at line 158 of file BFRenameLiveRange.cc.
References BFOptimization::ddg(), newReg_, BF2Scheduler::renamer(), RegisterRenamer::revertedRenameToRegister(), BFOptimization::sched_, DataDependenceGraph::undo(), undoNewAntiDeps(), undoReadUpdateData_, undoSetFirstDefsAndUses(), undoSetRegDefsAndLastUses(), undoSetTerminal(), undoWriteUpdateData_, unsetIncomingDeps(), and unsetOutgoingDeps().
|
protected |
Definition at line 289 of file BFRenameLiveRange.cc.
References bb_, liveRange_, TTAProgram::BasicBlock::liveRangeData_, newReg_, LiveRangeData::regFirstDefines_, and LiveRangeData::regFirstUses_.
Referenced by undoOnlyMe().
|
protected |
Definition at line 243 of file BFRenameLiveRange.cc.
References bb_, liveRange_, TTAProgram::BasicBlock::liveRangeData_, newReg_, LiveRangeData::regDefines_, and LiveRangeData::regLastUses_.
Referenced by undoOnlyMe().
|
protected |
Definition at line 136 of file BFRenameLiveRange.cc.
References TTAProgram::Terminal::copy(), TTAProgram::Terminal::index(), liveRange_, oldReg_, TTAProgram::Terminal::registerFile(), TTAProgram::Move::setDestination(), setGuard(), and TTAProgram::Move::setSource().
Referenced by undoOnlyMe().
|
protected |
Definition at line 196 of file BFRenameLiveRange.cc.
References bb_, TTAProgram::BasicBlock::liveRangeData_, newReg_, oldKill_, oldRegFirstDefines_, oldRegFirstUses_, LiveRangeData::regFirstDefines_, LiveRangeData::regFirstUses_, and LiveRangeData::regKills_.
Referenced by undoOnlyMe().
|
protected |
Definition at line 202 of file BFRenameLiveRange.cc.
References bb_, TTAProgram::BasicBlock::liveRangeData_, newReg_, oldLastKill_, oldRegDefines_, LiveRangeData::regDefines_, and LiveRangeData::regLastKills_.
Referenced by undoOnlyMe().
|
protected |
Definition at line 87 of file BFRenameLiveRange.hh.
Referenced by operator()(), renameLiveRange(), setFirstDefsAndUses(), setIncomingDeps(), setOutgoingDeps(), setRegDefsAndLastUses(), undoSetFirstDefsAndUses(), undoSetRegDefsAndLastUses(), unsetIncomingDeps(), and unsetOutgoingDeps().
|
protected |
Definition at line 97 of file BFRenameLiveRange.hh.
Referenced by renameLiveRange(), and undoNewAntiDeps().
|
protected |
Definition at line 86 of file BFRenameLiveRange.hh.
Referenced by notifySelector(), operator()(), renameLiveRange(), setFirstDefsAndUses(), setIncomingDeps(), setOutgoingDeps(), setRegDefsAndLastUses(), setTerminals(), undoSetFirstDefsAndUses(), undoSetRegDefsAndLastUses(), and undoSetTerminal().
|
protected |
Definition at line 88 of file BFRenameLiveRange.hh.
Referenced by renameLiveRange(), setFirstDefsAndUses(), setIncomingDeps(), setOutgoingDeps(), setRegDefsAndLastUses(), setTerminals(), undoOnlyMe(), undoSetFirstDefsAndUses(), undoSetRegDefsAndLastUses(), unsetIncomingDeps(), and unsetOutgoingDeps().
|
protected |
Definition at line 91 of file BFRenameLiveRange.hh.
Referenced by setIncomingDeps(), and unsetIncomingDeps().
|
protected |
Definition at line 90 of file BFRenameLiveRange.hh.
Referenced by setOutgoingDeps(), and unsetOutgoingDeps().
|
protected |
Definition at line 85 of file BFRenameLiveRange.hh.
Referenced by renameLiveRange(), undoSetTerminal(), and ~BFRenameLiveRange().
|
protected |
Definition at line 94 of file BFRenameLiveRange.hh.
Referenced by setOutgoingDeps(), and unsetOutgoingDeps().
|
protected |
Definition at line 95 of file BFRenameLiveRange.hh.
Referenced by setIncomingDeps(), and unsetIncomingDeps().
|
protected |
Definition at line 96 of file BFRenameLiveRange.hh.
Referenced by setIncomingDeps(), and unsetIncomingDeps().
|
protected |
Definition at line 92 of file BFRenameLiveRange.hh.
Referenced by operator()().
|
protected |
Definition at line 83 of file BFRenameLiveRange.hh.
Referenced by renameLiveRange(), and undoOnlyMe().
|
protected |
Definition at line 79 of file BFRenameLiveRange.hh.
Referenced by renameLiveRange(), and undoOnlyMe().