Lines Matching defs:liveness
9 #include "src/compiler/bytecode-liveness-map.h"
197 // Special case Suspend and Resume to just pass through liveness.
254 BytecodeLiveness& liveness,
257 // We should have copied the next bytecode's in liveness already in the
259 DCHECK_NE(liveness.out, next_bytecode_in_liveness);
262 if (liveness.out == next_bytecode_in_liveness) {
263 // If the out-liveness is aliasing the next bytecode's in-liveness,
265 liveness.out =
271 void UpdateOutLiveness(BytecodeLiveness& liveness,
276 // On subsequent updates, only update out-liveness manually if it isn't
277 // already aliasing the next bytecode's in-liveness.
278 if (!IsFirstUpdate && liveness.out == next_bytecode_in_liveness) return;
280 // Special case Suspend and Resume to just pass through liveness.
285 liveness.out = next_bytecode_in_liveness;
287 liveness.out->Union(*next_bytecode_in_liveness);
299 // On first update, we can assume that this out-liveness is the same as
300 // the next liveness, and can directly alias it -- we'll allocate a new
302 DCHECK_NULL(liveness.out);
303 liveness.out = next_bytecode_in_liveness;
305 liveness.out->Union(*next_bytecode_in_liveness);
309 // allocated out liveness.
310 DCHECK_NULL(liveness.out);
311 liveness.out = zone->New<BytecodeLivenessState>(
315 DCHECK_NOT_NULL(liveness.out);
318 // the liveness iterations.
321 EnsureOutLivenessIsNotAlias<IsFirstUpdate>(liveness,
323 liveness.out->Union(*liveness_map.GetInLiveness(target_offset));
325 EnsureOutLivenessIsNotAlias<IsFirstUpdate>(liveness,
329 liveness.out->Union(*liveness_map.GetInLiveness(entry.target_offset));
343 liveness, next_bytecode_in_liveness, zone);
344 bool was_accumulator_live = liveness.out->AccumulatorIsLive();
345 liveness.out->Union(*liveness_map.GetInLiveness(handler_offset));
346 liveness.out->MarkRegisterLive(handler_context);
352 liveness.out->MarkAccumulatorDead();
364 void UpdateOutLiveness(Bytecode bytecode, BytecodeLiveness& liveness,
373 liveness, next_bytecode_in_liveness, iterator, bytecode_array, \
383 void UpdateLiveness(BytecodeLiveness& liveness,
389 liveness, *next_bytecode_in_liveness, iterator, bytecode_array,
392 // On the first update, allocate the in-liveness as a copy of the
393 // out-liveness.
394 DCHECK_NULL(liveness.in);
395 liveness.in = zone->New<BytecodeLivenessState>(*liveness.out, zone);
397 // On subsequent updates, copy liveness from the out vector.
398 // TODO(leszeks): If this copy doesn't change liveness, we could
400 liveness.in->CopyFrom(*liveness.out);
403 liveness.in, iterator);
405 *next_bytecode_in_liveness = liveness.in;
409 void UpdateLiveness(Bytecode bytecode, BytecodeLiveness& liveness,
418 liveness, next_bytecode_in_liveness, iterator, bytecode_array, \
520 // tracking the out-liveness of *all* loop exits, which is not
590 BytecodeLiveness& liveness =
592 UpdateLiveness<true>(bytecode, liveness, &next_bytecode_in_liveness,
604 // At this point, every bytecode has a valid in and out liveness, except for
605 // propagating liveness across back edges (i.e. JumpLoop). Subsequent liveness
606 // analysis iterations can only add additional liveness bits that are pulled
609 // Furthermore, a loop header's in-liveness can only change based on any
611 // JumpLoop liveness being updated, as the only liveness bits than can be
614 // So, if we know that the liveness of bytecodes after a loop header won't
642 // Only update the loop body if the loop end liveness changed.
653 BytecodeLiveness& liveness = liveness_map().GetLiveness(current_offset);
654 UpdateLiveness(bytecode, liveness, &next_bytecode_in_liveness, iterator,
657 // Now we are at the loop header. Since the in-liveness of the header
658 // can't change, we need only to update the out-liveness.
685 // If the switch liveness changed, we have to propagate it up the remaining
694 BytecodeLiveness& liveness =
700 UpdateLiveness(bytecode, liveness, &next_bytecode_in_liveness, iterator,
975 // Ensure that there are no liveness changes if we iterate one more time.
981 BytecodeLiveness& liveness = liveness_map().GetLiveness(current_offset);
983 previous_liveness.CopyFrom(*liveness.out);
985 UpdateOutLiveness(bytecode, liveness, next_bytecode_in_liveness, iterator,
990 liveness.out->Union(*liveness_map().GetInLiveness(target_offset));
993 if (!liveness.out->Equals(previous_liveness)) {
994 invalid_liveness.CopyFrom(*liveness.out);
995 // Reset the invalid liveness.
996 liveness.out->CopyFrom(previous_liveness);
1002 previous_liveness.CopyFrom(*liveness.in);
1004 liveness.in->CopyFrom(*liveness.out);
1005 UpdateInLiveness(bytecode, liveness.in, iterator);
1007 if (!liveness.in->Equals(previous_liveness)) {
1008 invalid_liveness.CopyFrom(*liveness.in);
1009 // Reset the invalid liveness.
1010 liveness.in->CopyFrom(previous_liveness);
1016 next_bytecode_in_liveness = liveness.in;
1051 of << "Invalid liveness:" << std::endl;
1053 // Dump the bytecode, annotated with the liveness and marking loops.
1092 // Underline the invalid liveness.
1106 // Print the invalid liveness.