@@ -128,7 +128,7 @@ void TempLValueOptPass::tempLValueOpt(CopyAddrInst *copyInst) {
128128 //
129129 // alloc_stack %temp
130130 // ...
131- // first_use_of %temp // beginOfLiferange
131+ // first_use_of %temp // beginOfLiverange
132132 // ... // no reads or writes from/to %destination
133133 // copy_addr [take] %temp to %destination // copyInst
134134 // ... // no further uses of %temp (copyInst is the end of %temp liverange)
@@ -186,8 +186,8 @@ void TempLValueOptPass::tempLValueOpt(CopyAddrInst *copyInst) {
186186
187187 // Iterate over the liverange of the temporary and make some validity checks.
188188 AliasAnalysis *AA = nullptr ;
189- SILInstruction *beginOfLiferange = nullptr ;
190- bool endOfLiferangeReached = false ;
189+ SILInstruction *beginOfLiverange = nullptr ;
190+ bool endOfLiverangeReached = false ;
191191 for (auto iter = temporary->getIterator (); iter != block->end (); ++iter) {
192192 SILInstruction *inst = &*iter;
193193 // The dealloc_stack is the last user of the temporary.
@@ -197,19 +197,19 @@ void TempLValueOptPass::tempLValueOpt(CopyAddrInst *copyInst) {
197197 if (users.contains (inst) != 0 ) {
198198 // Check if the copyInst is the last user of the temporary (beside the
199199 // dealloc_stack).
200- if (endOfLiferangeReached )
200+ if (endOfLiverangeReached )
201201 return ;
202202
203203 // Find the first user of the temporary to get a more precise liverange.
204204 // It would be too conservative to treat the alloc_stack itself as the
205205 // begin of the liverange.
206- if (!beginOfLiferange )
207- beginOfLiferange = inst;
206+ if (!beginOfLiverange )
207+ beginOfLiverange = inst;
208208
209209 if (inst == copyInst)
210- endOfLiferangeReached = true ;
210+ endOfLiverangeReached = true ;
211211 }
212- if (beginOfLiferange && !endOfLiferangeReached ) {
212+ if (beginOfLiverange && !endOfLiverangeReached ) {
213213 // If the root address of the destination is within the liverange of the
214214 // temporary, we cannot replace all uses of the temporary with the
215215 // destination (it would break the def-use dominance rule).
@@ -233,21 +233,21 @@ void TempLValueOptPass::tempLValueOpt(CopyAddrInst *copyInst) {
233233 return ;
234234 }
235235 }
236- assert (endOfLiferangeReached );
236+ assert (endOfLiverangeReached );
237237
238238 // Move all projections of the destination address before the liverange of
239239 // the temporary.
240- for (auto iter = beginOfLiferange ->getIterator ();
240+ for (auto iter = beginOfLiverange ->getIterator ();
241241 iter != copyInst->getIterator ();) {
242242 SILInstruction *inst = &*iter++;
243243 if (projections.contains (inst))
244- inst->moveBefore (beginOfLiferange );
244+ inst->moveBefore (beginOfLiverange );
245245 }
246246
247247 if (!copyInst->isInitializationOfDest ()) {
248248 // Make sure the destination is uninitialized before the liverange of
249249 // the temporary.
250- SILBuilderWithScope builder (beginOfLiferange );
250+ SILBuilderWithScope builder (beginOfLiverange );
251251 builder.createDestroyAddr (copyInst->getLoc (), destination);
252252 }
253253
0 commit comments