OpenASIP 2.2
Loading...
Searching...
No Matches
BFRenameLiveRange.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2014 Tampere University.
3
4 This file is part of TTA-Based Codesign Environment (TCE).
5
6 Permission is hereby granted, free of charge, to any person obtaining a
7 copy of this software and associated documentation files (the "Software"),
8 to deal in the Software without restriction, including without limitation
9 the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 and/or sell copies of the Software, and to permit persons to whom the
11 Software is furnished to do so, subject to the following conditions:
12
13 The above copyright notice and this permission notice shall be included in
14 all copies or substantial portions of the Software.
15
16 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
19 THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21 FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
22 DEALINGS IN THE SOFTWARE.
23 */
24
25/**
26 * @file BFRenameLiveRange.hh
27 *
28 * Declaration of BFRenameLiveRange class
29 *
30 * Renames a liverange, consisting of one or more writes,
31 * and one or more either register reads or guadrd uses of the register.
32 *
33 * @author Heikki Kultala 2014-2020(heikki.kultala-no.spam-tuni.fi)
34 * @note rating: red
35 */
36
37#ifndef BF_RENAME_LIVERANGE_HH
38#define BF_RENAME_LIVERANGE_HH
39
40#include "BFOptimization.hh"
41#include "LiveRangeData.hh"
43#include "Terminal.hh"
44
46
47public:
49 std::shared_ptr<LiveRange> liveRange,
50 int targetCycle);
51
52 virtual bool operator()();
53 virtual ~BFRenameLiveRange();
54
55protected:
56 void undoSetTerminal();
57 void setTerminals();
58
59 void setGuard(TTAProgram::Move& move,
60 const TTAMachine::RegisterFile& rf, int regIndex);
65 void setOutgoingDeps();
66 void setIncomingDeps();
67 void unsetIncomingDeps();
68 void unsetOutgoingDeps();
69 void undoNewAntiDeps();
70 void notifySelector();
71
72 bool renameLiveRange(
73 class LiveRange& liveRange,
74 const class TCEString& reg,
75 bool usedAfter);
76
77 virtual void undoOnlyMe() override;
78
80 std::map<const MoveNode*,
84
86 std::shared_ptr<LiveRange> liveRange_;
89
93
98
99
100};
101
102#endif
virtual void undoOnlyMe() override
DataDependenceGraph::EdgeSet createdAntidepEdges_
virtual bool operator()()
TTAProgram::BasicBlock * bb_
LiveRangeData::MoveNodeUseSet oldRegFirstUses_
LiveRangeData::MoveNodeUseSet oldRegDefines_
void setGuard(TTAProgram::Move &move, const TTAMachine::RegisterFile &rf, int regIndex)
LiveRangeData::MoveNodeUseSet oldRegFirstDefines_
class TTAProgram::Terminal * oldReg_
std::map< const MoveNode *, DataDependenceGraph::UndoData, MoveNode::Comparator > undoReadUpdateData_
DataDependenceGraph::UndoData undoWriteUpdateData_
std::shared_ptr< LiveRange > liveRange_
bool renameLiveRange(class LiveRange &liveRange, const class TCEString &reg, bool usedAfter)
std::set< GraphEdge *, typename GraphEdge::Comparator > EdgeSet
Definition Graph.hh:54
std::set< MoveNodeUse > MoveNodeUseSet