OpenASIP 2.2
Loading...
Searching...
No Matches
LiveRangeData.hh
Go to the documentation of this file.
1/*
2 Copyright (c) 2002-2011 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 LiveRangeData.hh
27 *
28 * Declaration of LiveRangeData class.
29 *
30 * Contains live range-related data for one basic block.
31 * This is generated and used by ddg builder.
32 * This may also be used by later parts of the scheduler.
33 *
34 * @author Heikki Kultala 2011 (hkultala@cs.tut.fi)
35 * @note rating: red
36 */
37
38#ifndef TTA_LIVERANGE_DATA_HH
39#define TTA_LIVERANGE_DATA_HH
40
41#include "MoveNodeUse.hh"
42#include "TCEString.hh"
43
44#include <set>
45#include <map>
46
48 std::set<TCEString> registersAlive(
49 int cycle, int delaySlots, class DataDependenceGraph& ddg);
50
51 typedef std::set<MoveNodeUse > MoveNodeUseSet;
52 typedef std::map<TCEString, MoveNodeUseSet > MoveNodeUseMapSet;
53 typedef std::map<TCEString, MoveNodeUse > MoveNodeUseMap;
54 typedef std::map<TCEString, std::pair<MoveNodeUse, MoveNodeUse> >
56
57 typedef std::pair<TCEString, MoveNodeUseSet > MoveNodeUseSetPair;
58 typedef std::pair<TCEString, MoveNodeUse> MoveNodeUsePair;
59
60 const std::set<TCEString>& usedAfter() {
62 }
63
64 // merges liverangedata of successor into this.
65 void merge(LiveRangeData& succ);
66
67 static bool appendUseMapSets(
68 const MoveNodeUseMapSet& srcMap,
69 MoveNodeUseMapSet& dstMap,
70 bool addLoopProperty);
71
72 static void appendMoveNodeUse(
73 const MoveNodeUseSet& src,
74 MoveNodeUseSet& dst,
75 bool setLoopProperty);
76
77 // dependencies out from this BB
81
82 std::map<TCEString, std::pair<MoveNodeUse, bool> >potentialRegKills_;
83
84 // dependencies in to this BB
88
89 // dependencies from previous BBs.
92
93 // all alive after this BB.
96
97 // dependencies out from this BB
101
102 // dependencies into this one
106
107 // deps from previous BBs
110
111 // all alive after this
114
115 // fu state deps
119
120 // live range information
121 std::set<TCEString> registersUsedAfter_;
122 std::set<TCEString> registersUsedInOrAfter_;
123
124 // Liverange data, initialized from INLINEASM llvm instruction node,
125 // passed to DDG Builder.
126 std::set<TCEString> inlineAsmRegUses_;
127 std::set<TCEString> inlineAsmRegDefs_;
128 std::set<TCEString> inlineAsmClobbers_;
129};
130
131#endif
MoveNodeUseMapSet memFirstDefines_
static bool appendUseMapSets(const MoveNodeUseMapSet &srcMap, MoveNodeUseMapSet &dstMap, bool addLoopProperty)
std::pair< TCEString, MoveNodeUse > MoveNodeUsePair
const std::set< TCEString > & usedAfter()
void merge(LiveRangeData &succ)
MoveNodeUseMapSet memUseReaches_
MoveNodeUseMapSet regFirstUses_
MoveNodeUseMapSet regLastUses_
std::map< TCEString, MoveNodeUse > MoveNodeUseMap
std::set< MoveNodeUse > MoveNodeUseSet
MoveNodeUseSet fuDepAfter_
MoveNodeUseMapSet memLastUses_
MoveNodeUseSet fuDepReaches_
MoveNodeUseMapSet regUseAfter_
MoveNodeUseMapSet regUseReaches_
std::set< TCEString > registersUsedAfter_
MoveNodeUseMapSet regFirstDefines_
std::set< TCEString > registersAlive(int cycle, int delaySlots, class DataDependenceGraph &ddg)
std::set< TCEString > inlineAsmClobbers_
MoveNodeUseMapSet memDefines_
std::pair< TCEString, MoveNodeUseSet > MoveNodeUseSetPair
MoveNodeUseMapSet regDefAfter_
std::set< TCEString > registersUsedInOrAfter_
std::map< TCEString, MoveNodeUseSet > MoveNodeUseMapSet
MoveNodeUseMapPair regKills_
MoveNodeUseSet fuDeps_
static void appendMoveNodeUse(const MoveNodeUseSet &src, MoveNodeUseSet &dst, bool setLoopProperty)
MoveNodeUseMapSet memDefAfter_
std::set< TCEString > inlineAsmRegDefs_
std::map< TCEString, std::pair< MoveNodeUse, bool > > potentialRegKills_
std::set< TCEString > inlineAsmRegUses_
MoveNodeUseMapPair regLastKills_
MoveNodeUseMapSet regDefines_
MoveNodeUseMap memKills_
MoveNodeUseMapSet memUseAfter_
MoveNodeUseMapSet memDefReaches_
std::map< TCEString, std::pair< MoveNodeUse, MoveNodeUse > > MoveNodeUseMapPair
MoveNodeUseMapSet memFirstUses_
MoveNodeUseMap memLastKill_
MoveNodeUseMapSet regDefReaches_