Lines Matching defs:trial
564 rtx_insn *trial, *seq_insn, *prev;
570 delay slot. Do this by finding an insn, TRIAL, where
571 PREV_INSN (NEXT_INSN (TRIAL)) != TRIAL. */
573 for (trial = insn;
574 PREV_INSN (NEXT_INSN (trial)) == trial;
575 trial = NEXT_INSN (trial))
578 seq_insn = PREV_INSN (NEXT_INSN (trial));
595 trial = seq->insn (0);
597 add_insn_after (trial, prev, NULL);
601 emit_barrier_after (trial);
606 trial = emit_delay_sequence (trial, delay_list, XVECLEN (seq, 0) - 2);
607 else if (JUMP_P (trial))
608 INSN_ANNULLED_BRANCH_P (trial) = 0;
613 obstack_ptr_grow (&unfilled_slots_obstack, trial);
615 return trial;
685 rtx_insn *trial = next_nonnote_insn (insn);
686 rtx_insn *next_trial = next_active_insn (trial);
691 if (trial == 0
692 || !NONJUMP_INSN_P (trial)
693 || GET_CODE (PATTERN (trial)) == SEQUENCE
694 || recog_memoized (trial) < 0
695 || (! eligible_for_annul_false (insn, 0, trial, flags)
696 && ! eligible_for_annul_true (insn, 0, trial, flags))
697 || RTX_FRAME_RELATED_P (trial)
698 || can_throw_internal (trial))
712 if (eligible_for_annul_false (insn, 0, trial, flags))
715 INSN_FROM_TARGET_P (trial) = 1;
716 else if (! eligible_for_annul_true (insn, 0, trial, flags))
720 add_to_delay_list (trial, delay_list);
721 next_trial = next_active_insn (trial);
722 update_block (trial, trial);
723 delete_related_insns (trial);
742 if (eligible_for_annul_true (insn, 0, trial, flags))
962 rtx_insn *trial;
964 FOR_EACH_VEC_ELT (delay_list, i, trial)
965 if ((annul_true_p && INSN_FROM_TARGET_P (trial))
966 || (!annul_true_p && !INSN_FROM_TARGET_P (trial)))
1029 rtx_insn *trial;
1030 FOR_EACH_VEC_ELT (*delay_list, i, trial)
1032 mark_set_resources (trial, &cc_set, 0, MARK_SRC_DEST_CALL);
1051 rtx_insn *trial = seq->insn (i);
1054 if (insn_references_resource_p (trial, sets, false)
1055 || insn_sets_resource_p (trial, needed, false)
1056 || insn_sets_resource_p (trial, sets, false)
1057 /* If TRIAL is from the fallthrough code of an annulled branch insn
1060 && ! INSN_FROM_TARGET_P (trial)))
1065 redundant[i] = redundant_insn (trial, insn, new_delay_list);
1075 || (! insn_sets_resource_p (trial, other_needed, false)
1076 && ! may_trap_or_fault_p (PATTERN (trial)))))
1077 ? eligible_for_delay (insn, total_slots_filled, trial, flags)
1083 trial, flags)))
1089 if (RTX_FRAME_RELATED_P (trial))
1093 rtx_insn *temp = copy_delay_slot_insn (trial);
1159 rtx_insn *trial = seq->insn (i);
1162 if (insn_references_resource_p (trial, sets, false)
1163 || insn_sets_resource_p (trial, needed, false)
1164 || insn_sets_resource_p (trial, sets, false))
1168 if ((prior_insn = redundant_insn (trial, insn, *delay_list)))
1171 update_block (trial, insn);
1172 delete_from_delay_slot (trial);
1178 || (! insn_sets_resource_p (trial, other_needed, false)
1179 && ! may_trap_or_fault_p (PATTERN (trial)))))
1180 ? eligible_for_delay (insn, *pslots_filled, trial, flags)
1183 && eligible_for_annul_true (insn, *pslots_filled, trial, flags)))
1187 delete_from_delay_slot (trial);
1188 add_to_delay_list (trial, delay_list);
1214 rtx_insn *trial, *next_trial;
1241 for (trial = thread; !stop_search_p (trial, 1); trial = next_trial)
1243 rtx pat = PATTERN (trial);
1244 rtx oldtrial = trial;
1246 next_trial = next_nonnote_insn (trial);
1248 /* TRIAL must be a CALL_INSN or INSN. Skip USE and CLOBBER. */
1249 if (NONJUMP_INSN_P (trial)
1253 if (GET_CODE (next_to_match) == GET_CODE (trial)
1254 && ! insn_references_resource_p (trial, &set, true)
1255 && ! insn_sets_resource_p (trial, &set, true)
1256 && ! insn_sets_resource_p (trial, &needed, true)
1257 && (trial = try_split (pat, trial, 0)) != 0
1259 && (next_trial = next_nonnote_insn (trial))
1261 && (thread = oldtrial == thread ? trial : thread)
1262 && rtx_equal_p (PATTERN (next_to_match), PATTERN (trial))
1265 && eligible_for_delay (delay_insn, slot_number - 1, trial, flags))
1270 update_block (trial, thread);
1271 if (trial == thread)
1274 delete_related_insns (trial);
1278 merged_insns.safe_push (std::pair<rtx_insn *, bool> (trial, false));
1286 mark_set_resources (trial, &set, 0, MARK_SRC_DEST_CALL);
1287 mark_referenced_resources (trial, &needed, true);
1293 && trial && NONJUMP_INSN_P (trial)
1294 && GET_CODE (PATTERN (trial)) == SEQUENCE
1295 && !(JUMP_P (XVECEXP (PATTERN (trial), 0, 0))
1296 && INSN_ANNULLED_BRANCH_P (XVECEXP (PATTERN (trial), 0, 0))))
1298 rtx_sequence *pat = as_a <rtx_sequence *> (PATTERN (trial));
1316 TRIAL's delay list. */
1353 slots of any trial insns we encounter. */
1414 rtx_insn *trial;
1426 for (trial = PREV_INSN (target),
1428 trial && insns_to_search > 0;
1429 trial = PREV_INSN (trial))
1434 if (LABEL_P (trial) || BARRIER_P (trial))
1437 if (!INSN_P (trial))
1441 pat = PATTERN (trial);
1445 trial) == DEBUG_INSN)
1478 else if (GET_CODE (trial) == GET_CODE (insn) && rtx_equal_p (pat, ipat)
1479 && ! find_reg_note (trial, REG_UNUSED, NULL_RTX))
1484 if (trial == 0)
1529 for (trial = PREV_INSN (target),
1531 trial && !LABEL_P (trial) && insns_to_search > 0;
1532 trial = PREV_INSN (trial))
1534 if (!INSN_P (trial))
1538 pat = PATTERN (trial);
1542 if (GET_CODE (trial) == DEBUG_INSN)
1597 /* See if TRIAL is the same as INSN. */
1598 pat = PATTERN (trial);
1600 return trial;
1602 /* Can't go any further if TRIAL conflicts with INSN. */
1603 if (insn_sets_resource_p (trial, &needed, true))
1830 rtx_insn *insn, *trial, *next_trial;
1899 if ((trial = next_active_insn (insn))
1900 && JUMP_P (trial)
1901 && simplejump_p (trial)
1902 && eligible_for_delay (insn, slots_filled, trial, flags)
1903 && no_labels_between_p (insn, trial)
1904 && ! can_throw_internal (trial))
1908 add_to_delay_list (trial, &delay_list);
1910 /* TRIAL may have had its delay slot filled, then unfilled. When
1911 the delay slot is unfilled, TRIAL is placed back on the unfilled
1915 try and find TRIAL. */
1917 while (*tmp != trial && tmp != unfilled_slots_next)
1922 if (*tmp == trial)
1925 rtx_insn *next = NEXT_INSN (trial);
1926 rtx_insn *prev = PREV_INSN (trial);
1968 for (trial = prev_nonnote_insn (insn); ! stop_search_p (trial, 1);
1969 trial = next_trial)
1971 next_trial = prev_nonnote_insn (trial);
1974 pat = PATTERN (trial);
1981 if (GET_CODE (trial) == DEBUG_INSN)
1986 if (! insn_references_resource_p (trial, &set, true)
1987 && ! insn_sets_resource_p (trial,
1990 && ! insn_sets_resource_p (trial, &needed, true)
1991 && ! can_throw_internal (trial))
1993 trial = try_split (pat, trial, 1);
1994 next_trial = prev_nonnote_insn (trial);
1995 if (eligible_for_delay (insn, slots_filled, trial, flags))
2002 update_reg_dead_notes (trial, insn);
2003 delay_list.safe_insert (0, trial);
2004 update_block (trial, trial);
2005 delete_related_insns (trial);
2012 mark_set_resources (trial, &set, 0, MARK_SRC_DEST_CALL);
2015 mark_set_resources (trial, &fset, 0, MARK_SRC_DEST_CALL);
2025 mark_referenced_resources (trial, &needed, true);
2092 for (trial = next_nonnote_insn (insn); !stop_search_p (trial, 1);
2093 trial = next_trial)
2095 next_trial = next_nonnote_insn (trial);
2098 pat = PATTERN (trial);
2105 if (GET_CODE (trial) == DEBUG_INSN)
2113 trial_delay = trial;
2121 && ! insn_references_resource_p (trial, &set, true)
2122 && ! insn_sets_resource_p (trial, &set, true)
2123 && ! insn_sets_resource_p (trial, &needed, true)
2125 && (trial = try_split (pat, trial, 0))
2126 && eligible_for_delay (insn, slots_filled, trial, flags)
2127 && ! can_throw_internal (trial))
2129 next_trial = next_nonnote_insn (trial);
2130 add_to_delay_list (trial, &delay_list);
2132 delete_related_insns (trial);
2138 mark_set_resources (trial, &set, 0, MARK_SRC_DEST_CALL);
2139 mark_referenced_resources (trial, &needed, true);
2157 && trial
2158 && jump_to_label_p (trial)
2159 && simplejump_p (trial)
2160 && (next_trial = next_active_insn (JUMP_LABEL_AS_INSN (trial))) != 0
2170 && ! can_throw_internal (trial))
2177 new_label = get_label_before (new_label, JUMP_LABEL (trial));
2186 reorg_redirect_jump (as_a <rtx_jump_insn *> (trial),
2307 rtx_insn *trial;
2367 for (trial = thread;
2368 ! stop_search_p (trial, ! thread_if_true) && (! lose || own_thread);
2369 trial = next_nonnote_insn (trial))
2374 if (LABEL_P (trial))
2380 pat = PATTERN (trial);
2384 if (GET_CODE (trial) == DEBUG_INSN)
2387 /* If TRIAL conflicts with the insns ahead of it, we lose. */
2388 if (! insn_references_resource_p (trial, &set, true)
2389 && ! insn_sets_resource_p (trial, filter_flags ? &fset : &set, true)
2390 && ! insn_sets_resource_p (trial, &needed, true)
2395 - insns between the delay-slot insn and the trial-insn
2398 || ! insn_sets_resource_p (trial, &flags_res, true)
2399 || find_regno_note (trial, REG_UNUSED, targetm.flags_regnum)
2401 && ! can_throw_internal (trial))
2405 /* If TRIAL is redundant with some insn before INSN, we don't
2408 if ((prior_insn = redundant_insn (trial, insn, *delay_list)))
2413 update_block (trial, thread);
2414 if (trial == thread)
2417 if (new_thread == trial)
2421 delete_related_insns (trial);
2425 update_reg_unused_notes (prior_insn, trial);
2426 new_thread = next_active_insn (trial);
2432 /* There are two ways we can win: If TRIAL doesn't set anything
2438 && (own_thread || !RTX_FRAME_RELATED_P (trial)))
2439 || (! insn_sets_resource_p (trial, &opposite_needed, true)
2441 trial))))
2443 old_trial = trial;
2444 trial = try_split (pat, trial, 0);
2446 new_thread = trial;
2448 thread = trial;
2449 pat = PATTERN (trial);
2450 if (eligible_for_delay (insn, *pslots_filled, trial, flags))
2453 else if (!RTX_FRAME_RELATED_P (trial)
2457 old_trial = trial;
2458 trial = try_split (pat, trial, 0);
2460 new_thread = trial;
2462 thread = trial;
2463 pat = PATTERN (trial);
2466 && eligible_for_annul_false (insn, *pslots_filled, trial, flags)
2468 && eligible_for_annul_true (insn, *pslots_filled, trial, flags)))
2483 update_block (trial, thread);
2484 if (trial == thread)
2487 if (new_thread == trial)
2494 for (note = REG_NOTES (trial);
2508 if (jump_to_label_p (trial))
2509 LABEL_NUSES (JUMP_LABEL (trial))++;
2511 delete_related_insns (trial);
2513 for (note = REG_NOTES (trial);
2527 if (jump_to_label_p (trial))
2528 LABEL_NUSES (JUMP_LABEL (trial))--;
2531 new_thread = next_active_insn (trial);
2533 temp = own_thread ? trial : copy_delay_slot_insn (trial);
2571 mark_set_resources (trial, &set, 0, MARK_SRC_DEST_CALL);
2572 mark_referenced_resources (trial, &needed, true);
2575 mark_set_resources (trial, &fset, 0, MARK_SRC_DEST_CALL);
2606 if (NONJUMP_INSN_P (trial) && GET_CODE (pat) == SET
2611 rtx_insn *next = next_nonnote_insn (trial);
2625 if (trial && NONJUMP_INSN_P (trial)
2626 && GET_CODE (PATTERN (trial)) == SEQUENCE
2627 && JUMP_P (XVECEXP (PATTERN (trial), 0, 0)))
2629 rtx_sequence *sequence = as_a <rtx_sequence *> (PATTERN (trial));
2632 if (thread_if_true && trial == new_thread)
2641 if (own_thread && trial != new_thread)
2669 trial = as_a <rtx_insn *> (new_thread);
2670 rtx pat = PATTERN (trial);
2672 if (!NONJUMP_INSN_P (trial)
2674 || ! eligible_for_delay (insn, 0, trial, flags)
2675 || can_throw_internal (trial))
2712 update_block (trial, thread);
2713 if (trial == thread)
2716 if (new_thread == trial)
2719 delete_related_insns (trial);
2722 new_thread = next_active_insn (trial);
2724 ninsn = own_thread ? trial : copy_delay_slot_insn (trial);
3289 rtx trial = skip_consecutive_labels (follow_jumps (target_label,
3292 if (ANY_RETURN_P (trial))
3293 trial = find_end_label (trial);
3295 if (trial && trial != target_label
3296 && redirect_with_delay_slots_safe_p (delay_jump_insn, trial, insn))
3298 reorg_redirect_jump (delay_jump_insn, trial);
3299 target_label = trial;
3309 trial = next_real_nondebug_insn (target_label);
3310 if (trial && GET_CODE (PATTERN (trial)) != SEQUENCE
3311 && redundant_insn (trial, insn, vNULL)
3312 && ! can_throw_internal (trial))
3316 rtx_insn *tmp = next_active_insn (as_a<rtx_insn *> (trial));
3323 We know "trial" is an insn here as it is the output of
3325 update_block (as_a <rtx_insn *> (trial), tmp);
3339 trial ? dyn_cast <rtx_sequence *> (PATTERN (trial)) : NULL;