OpenASIP
2.0
|
#include <LiveRangeData.hh>
Public Types | |
typedef std::set< MoveNodeUse > | MoveNodeUseSet |
typedef std::map< TCEString, MoveNodeUseSet > | MoveNodeUseMapSet |
typedef std::map< TCEString, MoveNodeUse > | MoveNodeUseMap |
typedef std::map< TCEString, std::pair< MoveNodeUse, MoveNodeUse > > | MoveNodeUseMapPair |
typedef std::pair< TCEString, MoveNodeUseSet > | MoveNodeUseSetPair |
typedef std::pair< TCEString, MoveNodeUse > | MoveNodeUsePair |
Public Member Functions | |
std::set< TCEString > | registersAlive (int cycle, int delaySlots, class DataDependenceGraph &ddg) |
const std::set< TCEString > & | usedAfter () |
void | merge (LiveRangeData &succ) |
Static Public Member Functions | |
static bool | appendUseMapSets (const MoveNodeUseMapSet &srcMap, MoveNodeUseMapSet &dstMap, bool addLoopProperty) |
static void | appendMoveNodeUse (const MoveNodeUseSet &src, MoveNodeUseSet &dst, bool setLoopProperty) |
Definition at line 47 of file LiveRangeData.hh.
typedef std::map<TCEString, MoveNodeUse > LiveRangeData::MoveNodeUseMap |
Definition at line 53 of file LiveRangeData.hh.
typedef std::map<TCEString, std::pair<MoveNodeUse, MoveNodeUse> > LiveRangeData::MoveNodeUseMapPair |
Definition at line 55 of file LiveRangeData.hh.
typedef std::map<TCEString, MoveNodeUseSet > LiveRangeData::MoveNodeUseMapSet |
Definition at line 52 of file LiveRangeData.hh.
typedef std::pair<TCEString, MoveNodeUse> LiveRangeData::MoveNodeUsePair |
Definition at line 58 of file LiveRangeData.hh.
typedef std::set<MoveNodeUse > LiveRangeData::MoveNodeUseSet |
Definition at line 51 of file LiveRangeData.hh.
typedef std::pair<TCEString, MoveNodeUseSet > LiveRangeData::MoveNodeUseSetPair |
Definition at line 57 of file LiveRangeData.hh.
|
static |
Appends a MoveNodeUseSet to another. May set loop property of copied moves to true.
src | source set |
dst | destination set |
setLoopProperty | whether to set loop property true in copied data |
Definition at line 107 of file LiveRangeData.cc.
References MoveNodeUse::INTRA_BB, MoveNodeUse::LOOP, and MoveNodeUse::loop().
Referenced by appendUseMapSets(), and DataDependenceGraphBuilder::setSucceedingPredepsForBB().
|
static |
This appends the data from one MoveNodeUseMapSet to another.
it traverses the map, and for every string, set pair it finds or creates the corresponging set in the destination and appends the set to that set. This is used for copying alive definitions.
srcMap | source where to copy from |
dstMap | destination where to copy to. |
addLoopProperty | whether to add loop property to the copied bookkeeping, ie create edges with loop property. |
Definition at line 79 of file LiveRangeData.cc.
References appendMoveNodeUse().
Referenced by merge(), DataDependenceGraphBuilder::setSucceedingPredepsForBB(), DataDependenceGraphBuilder::updateMemAndFuAliveAfter(), and DataDependenceGraphBuilder::updateRegistersAliveAfter().
void LiveRangeData::merge | ( | LiveRangeData & | succ | ) |
merges liverangedata of successor into this.
succ | later basic block which is merged into this one. |
Definition at line 47 of file LiveRangeData.cc.
References appendUseMapSets(), regDefines_, regDefReaches_, regFirstDefines_, regFirstUses_, registersUsedAfter_, and regLastUses_.
Referenced by ControlFlowGraph::mergeNodes().
std::set< TCEString > LiveRangeData::registersAlive | ( | int | cycle, |
int | delaySlots, | ||
class DataDependenceGraph & | ddg | ||
) |
Returns the set of registers that are alive at the given cycle.
Definition at line 127 of file LiveRangeData.cc.
References MoveNode::cycle(), DataDependenceEdge::data(), DataDependenceEdge::DEP_RAW, DataDependenceEdge::dependenceType(), DataDependenceEdge::EDGE_RA, DataDependenceEdge::EDGE_REGISTER, DataDependenceEdge::edgeReason(), BoostGraph< GraphNode, GraphEdge >::headNode(), DataDependenceEdge::headPseudo(), MoveNode::isScheduled(), BoostGraph< GraphNode, GraphEdge >::node(), BoostGraph< GraphNode, GraphEdge >::nodeCount(), BoostGraph< GraphNode, GraphEdge >::outEdges(), regDefines_, regDefReaches_, regFirstUses_, registersUsedAfter_, regKills_, and DataDependenceEdge::tailPseudo().
Referenced by BasicBlockPass::executeDDGPass().
|
inline |
Definition at line 60 of file LiveRangeData.hh.
References registersUsedAfter_.
MoveNodeUseSet LiveRangeData::fuDepAfter_ |
Definition at line 118 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::setSucceedingPredepsForBB(), and DataDependenceGraphBuilder::updateMemAndFuAliveAfter().
MoveNodeUseSet LiveRangeData::fuDepReaches_ |
MoveNodeUseSet LiveRangeData::fuDeps_ |
Definition at line 117 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::createTriggerDependencies(), DataDependenceGraphBuilder::updateBB(), and DataDependenceGraphBuilder::updateMemAndFuAliveAfter().
std::set<TCEString> LiveRangeData::inlineAsmClobbers_ |
Definition at line 128 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), and ControlFlowGraph::splitBasicBlockAtIndex().
std::set<TCEString> LiveRangeData::inlineAsmRegDefs_ |
Definition at line 127 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), and ControlFlowGraph::splitBasicBlockAtIndex().
std::set<TCEString> LiveRangeData::inlineAsmRegUses_ |
Definition at line 126 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), and ControlFlowGraph::splitBasicBlockAtIndex().
MoveNodeUseMapSet LiveRangeData::memDefAfter_ |
Definition at line 112 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::setSucceedingPredepsForBB(), and DataDependenceGraphBuilder::updateMemAndFuAliveAfter().
MoveNodeUseMapSet LiveRangeData::memDefines_ |
Definition at line 98 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::processMemUse(), DataDependenceGraphBuilder::processMemWrite(), and DataDependenceGraphBuilder::updateMemAndFuAliveAfter().
MoveNodeUseMapSet LiveRangeData::memDefReaches_ |
Definition at line 108 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::setSucceedingPredepsForBB(), DataDependenceGraphBuilder::updateMemAndFuAliveAfter(), DataDependenceGraphBuilder::updateMemUse(), and DataDependenceGraphBuilder::updateMemWrite().
MoveNodeUseMapSet LiveRangeData::memFirstDefines_ |
Definition at line 105 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::processMemWrite(), and DataDependenceGraphBuilder::updateBB().
MoveNodeUseMapSet LiveRangeData::memFirstUses_ |
Definition at line 104 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::processMemUse(), and DataDependenceGraphBuilder::updateBB().
MoveNodeUseMap LiveRangeData::memKills_ |
Definition at line 103 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::processMemUse(), DataDependenceGraphBuilder::processMemWrite(), and DataDependenceGraphBuilder::updateMemAndFuAliveAfter().
MoveNodeUseMap LiveRangeData::memLastKill_ |
Definition at line 100 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::processMemWrite().
MoveNodeUseMapSet LiveRangeData::memLastUses_ |
Definition at line 99 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::processMemUse(), and DataDependenceGraphBuilder::processMemWrite().
MoveNodeUseMapSet LiveRangeData::memUseAfter_ |
Definition at line 113 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::setSucceedingPredepsForBB(), and DataDependenceGraphBuilder::updateMemAndFuAliveAfter().
MoveNodeUseMapSet LiveRangeData::memUseReaches_ |
std::map<TCEString, std::pair<MoveNodeUse, bool> > LiveRangeData::potentialRegKills_ |
Definition at line 82 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::constructIndividualBB(), DataDependenceGraphBuilder::processRegUse(), and DataDependenceGraphBuilder::processRegWrite().
MoveNodeUseMapSet LiveRangeData::regDefAfter_ |
Definition at line 94 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::setSucceedingPredepsForBB(), and DataDependenceGraphBuilder::updateRegistersAliveAfter().
MoveNodeUseMapSet LiveRangeData::regDefines_ |
Definition at line 78 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), BFRegCopy::createAntidepsForReg(), RegisterCopyAdder::createAntidepsForReg(), BBSchedulerController::handleBasicBlock(), RegisterRenamer::initializeFreeRegisters(), merge(), DataDependenceGraphBuilder::processRegUse(), DataDependenceGraphBuilder::processRegWrite(), registersAlive(), RegisterRenamer::renameLiveRange(), BF2Scheduler::revertBBLiveRangeBookkeepingForDestination(), RegisterRenamer::revertedRenameToRegister(), BFRenameLiveRange::setOutgoingDeps(), BFRenameLiveRange::setRegDefsAndLastUses(), BFRenameLiveRange::undoSetRegDefsAndLastUses(), BFRenameLiveRange::unsetOutgoingDeps(), and DataDependenceGraphBuilder::updateRegistersAliveAfter().
MoveNodeUseMapSet LiveRangeData::regDefReaches_ |
Definition at line 90 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), BBSchedulerController::handleBasicBlock(), RegisterRenamer::initializeFreeRegisters(), merge(), DataDependenceGraphBuilder::processEntryNode(), registersAlive(), DataDependenceGraphBuilder::setSucceedingPredepsForBB(), DataDependenceGraphBuilder::updateRegistersAliveAfter(), DataDependenceGraph::updateRegUse(), and DataDependenceGraph::updateRegWrite().
MoveNodeUseMapSet LiveRangeData::regFirstDefines_ |
Definition at line 87 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), BFRegCopy::createAntidepsForReg(), RegisterCopyAdder::createAntidepsForReg(), BBSchedulerController::handleBasicBlock(), merge(), DataDependenceGraphBuilder::processRegWrite(), RegisterRenamer::renameLiveRange(), BF2Scheduler::revertBBLiveRangeBookkeepingForDestination(), RegisterRenamer::revertedRenameToRegister(), BFRenameLiveRange::setFirstDefsAndUses(), BFRenameLiveRange::setIncomingDeps(), BFRenameLiveRange::undoSetFirstDefsAndUses(), BFRenameLiveRange::unsetIncomingDeps(), RegisterRenamer::updateAntiEdgesFromLRTo(), and DataDependenceGraphBuilder::updateBB().
MoveNodeUseMapSet LiveRangeData::regFirstUses_ |
Definition at line 86 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), BFRegCopy::createAntidepsForReg(), RegisterCopyAdder::createAntidepsForReg(), BBSchedulerController::handleBasicBlock(), RegisterRenamer::initializeFreeRegisters(), merge(), DataDependenceGraphBuilder::processRegUse(), registersAlive(), RegisterRenamer::renameLiveRange(), BF2Scheduler::revertBBLiveRangeBookkeepingForSource(), RegisterRenamer::revertedRenameToRegister(), BFRenameLiveRange::setFirstDefsAndUses(), BFRenameLiveRange::setIncomingDeps(), BFRenameLiveRange::undoSetFirstDefsAndUses(), BFRenameLiveRange::unsetIncomingDeps(), DataDependenceGraphBuilder::updateBB(), and DataDependenceGraphBuilder::updateRegistersUsedInOrAfter().
std::set<TCEString> LiveRangeData::registersUsedAfter_ |
Definition at line 121 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), BBSchedulerController::handleBasicBlock(), RegisterRenamer::initializeFreeRegisters(), merge(), registersAlive(), DataDependenceGraphBuilder::updatePreceedingRegistersUsedAfter(), DataDependenceGraphBuilder::updateRegistersUsedInOrAfter(), and usedAfter().
std::set<TCEString> LiveRangeData::registersUsedInOrAfter_ |
Definition at line 122 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::updatePreceedingRegistersUsedAfter(), and DataDependenceGraphBuilder::updateRegistersUsedInOrAfter().
MoveNodeUseMapPair LiveRangeData::regKills_ |
Definition at line 85 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::constructIndividualFromInlineAsmBB(), DataDependenceGraphBuilder::processRegUse(), DataDependenceGraphBuilder::processRegWrite(), registersAlive(), RegisterRenamer::renameLiveRange(), BFRenameLiveRange::setIncomingDeps(), BFRenameLiveRange::unsetIncomingDeps(), DataDependenceGraphBuilder::updateRegistersAliveAfter(), and DataDependenceGraphBuilder::updateRegistersUsedInOrAfter().
MoveNodeUseMapPair LiveRangeData::regLastKills_ |
Definition at line 80 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::processRegWrite(), RegisterRenamer::renameLiveRange(), BFRenameLiveRange::setOutgoingDeps(), and BFRenameLiveRange::unsetOutgoingDeps().
MoveNodeUseMapSet LiveRangeData::regLastUses_ |
Definition at line 79 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), BFRegCopy::createAntidepsForReg(), RegisterCopyAdder::createAntidepsForReg(), BBSchedulerController::handleBasicBlock(), RegisterRenamer::initializeFreeRegisters(), merge(), DataDependenceGraphBuilder::processRegUse(), DataDependenceGraphBuilder::processRegWrite(), RegisterRenamer::renameLiveRange(), BF2Scheduler::revertBBLiveRangeBookkeepingForSource(), RegisterRenamer::revertedRenameToRegister(), BFRenameLiveRange::setRegDefsAndLastUses(), BFRenameLiveRange::undoSetRegDefsAndLastUses(), and DataDependenceGraphBuilder::updateRegistersAliveAfter().
MoveNodeUseMapSet LiveRangeData::regUseAfter_ |
Definition at line 95 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::setSucceedingPredepsForBB(), and DataDependenceGraphBuilder::updateRegistersAliveAfter().
MoveNodeUseMapSet LiveRangeData::regUseReaches_ |
Definition at line 91 of file LiveRangeData.hh.
Referenced by DataDependenceGraphBuilder::clearUnneededBookkeeping(), DataDependenceGraphBuilder::setSucceedingPredepsForBB(), DataDependenceGraphBuilder::updateRegistersAliveAfter(), and DataDependenceGraph::updateRegWrite().