This repository was archived by the owner on Feb 5, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -240,8 +240,11 @@ unsigned StackColoring::collectMarkers(unsigned NumSlot) {
240
240
BasicBlocks[*FI] = BasicBlockNumbering.size ();
241
241
BasicBlockNumbering.push_back (*FI);
242
242
243
- BlockLiveness[*FI].Begin .resize (NumSlot);
244
- BlockLiveness[*FI].End .resize (NumSlot);
243
+ // Keep a reference to avoid repeated lookups.
244
+ BlockLifetimeInfo &BlockInfo = BlockLiveness[*FI];
245
+
246
+ BlockInfo.Begin .resize (NumSlot);
247
+ BlockInfo.End .resize (NumSlot);
245
248
246
249
for (MachineBasicBlock::iterator BI = (*FI)->begin (), BE = (*FI)->end ();
247
250
BI != BE; ++BI) {
@@ -265,15 +268,15 @@ unsigned StackColoring::collectMarkers(unsigned NumSlot) {
265
268
}
266
269
267
270
if (IsStart) {
268
- BlockLiveness[*FI] .Begin .set (Slot);
271
+ BlockInfo .Begin .set (Slot);
269
272
} else {
270
- if (BlockLiveness[*FI] .Begin .test (Slot)) {
273
+ if (BlockInfo .Begin .test (Slot)) {
271
274
// Allocas that start and end within a single block are handled
272
275
// specially when computing the LiveIntervals to avoid pessimizing
273
276
// the liveness propagation.
274
- BlockLiveness[*FI] .Begin .reset (Slot);
277
+ BlockInfo .Begin .reset (Slot);
275
278
} else {
276
- BlockLiveness[*FI] .End .set (Slot);
279
+ BlockInfo .End .set (Slot);
277
280
}
278
281
}
279
282
}
You can’t perform that action at this time.
0 commit comments