LLVM: include/llvm/CodeGen/SpillPlacement.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26#ifndef LLVM_LIB_CODEGEN_SPILLPLACEMENT_H
27#define LLVM_LIB_CODEGEN_SPILLPLACEMENT_H
28
35
36namespace llvm {
37
44
48
50
54
55 std::unique_ptr<Node[]> nodes;
56
57
58
60
61
63
64
65
67
68
70
71
72
74
75
77
78public:
79
80
88
89
94
95
96
97
99
101 void dump() const;
102 };
103
104
105
106
107
108
109
110
112
113
114
115
116
118
119
120
121
122
123
124
126
127
129
130
131
132
133
134
136
137
138
140
141
142
144
145
146
147
148
149
150
151
153
154
155
157 return BlockFrequencies[Number];
158 }
159
161 MachineFunctionAnalysisManager::Invalidator &Inv);
162
165
166private:
168
169 void releaseMemory();
170
173 void activate(unsigned n);
175
176 bool update(unsigned n);
177};
178
180public:
183
186
187private:
190 void getAnalysisUsage(AnalysisUsage &AU) const override;
191 void releaseMemory() override { Impl.releaseMemory(); }
192};
193
203
204}
205
206#endif
This file defines the SmallVector class.
This file defines the SparseSet class derived from the version described in Briggs,...
Represent the analysis usage information of a pass.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
MachineBlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate machine basic b...
MachineFunctionPass(char &ID)
virtual void releaseMemory()
releaseMemory() - This member can be implemented by a pass if it wants to be able to release its memo...
A set of analyses that are preserved following a run of a transformation pass.
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
SparseSet - Fast set implementation for objects that can be identified by small unsigned keys.
Definition SpillPlacement.h:195
SpillPlacement run(MachineFunction &, MachineFunctionAnalysisManager &)
SpillPlacement Result
Definition SpillPlacement.h:200
Definition SpillPlacement.h:179
SpillPlacementWrapperLegacy()
Definition SpillPlacement.h:182
const SpillPlacement & getResult() const
Definition SpillPlacement.h:185
SpillPlacement & getResult()
Definition SpillPlacement.h:184
static char ID
Definition SpillPlacement.h:181
Definition SpillPlacement.h:45
void addConstraints(ArrayRef< BlockConstraint > LiveBlocks)
addConstraints - Add constraints and biases.
bool finish()
finish - Compute the optimal spill code placement given the constraints.
void addPrefSpill(ArrayRef< unsigned > Blocks, bool Strong)
addPrefSpill - Add PrefSpill constraints to all blocks listed.
friend class SpillPlacementWrapperLegacy
Definition SpillPlacement.h:46
bool scanActiveBundles()
scanActiveBundles - Perform an initial scan of all bundles activated by addConstraints and addLinks,...
bool invalidate(MachineFunction &MF, const PreservedAnalyses &PA, MachineFunctionAnalysisManager::Invalidator &Inv)
friend class SpillPlacementAnalysis
Definition SpillPlacement.h:47
void addLinks(ArrayRef< unsigned > Links)
addLinks - Add transparent blocks with the given numbers.
void iterate()
iterate - Update the network iteratively until convergence, or new bundles are found.
BorderConstraint
BorderConstraint - A basic block has separate constraints for entry and exit.
Definition SpillPlacement.h:81
@ MustSpill
A register is impossible, variable must be spilled.
Definition SpillPlacement.h:86
@ DontCare
Block doesn't care / variable not live.
Definition SpillPlacement.h:82
@ PrefBoth
Block entry prefers both register and stack.
Definition SpillPlacement.h:85
@ PrefReg
Block entry/exit prefers a register.
Definition SpillPlacement.h:83
@ PrefSpill
Block entry/exit prefers a stack slot.
Definition SpillPlacement.h:84
SpillPlacement(SpillPlacement &&)
ArrayRef< unsigned > getRecentPositive()
getRecentPositive - Return an array of bundles that became positive during the previous call to scanA...
Definition SpillPlacement.h:143
BlockFrequency getBlockFrequency(unsigned Number) const
getBlockFrequency - Return the estimated block execution frequency per function invocation.
Definition SpillPlacement.h:156
This class implements an extremely fast bulk output stream that can only output to a stream.
This is an optimization pass for GlobalISel generic memory operations.
AnalysisManager< MachineFunction > MachineFunctionAnalysisManager
Node - Each edge bundle corresponds to a Hopfield node.
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
BlockConstraint - Entry and exit constraints for a basic block.
Definition SpillPlacement.h:90
BorderConstraint Exit
Constraint on block exit.
Definition SpillPlacement.h:93
void print(raw_ostream &OS) const
bool ChangesValue
True when this block changes the value of the live range.
Definition SpillPlacement.h:98
BorderConstraint Entry
Constraint on block entry.
Definition SpillPlacement.h:92
unsigned Number
Basic block number (from MBB::getNumber()).
Definition SpillPlacement.h:91