{
rtx note, n;
bool handled_one = false;
- bool need_flush = false;
-
- any_cfis_emitted = false;
for (note = REG_NOTES (insn); note; note = XEXP (note, 1))
switch (REG_NOTE_KIND (note))
break;
case REG_CFA_FLUSH_QUEUE:
- /* The actual flush happens below. */
- need_flush = true;
+ /* The actual flush happens elsewhere. */
handled_one = true;
break;
break;
}
- if (handled_one)
- {
- /* Minimize the number of advances by emitting the entire queue
- once anything is emitted. */
- need_flush |= any_cfis_emitted;
- }
- else
+ if (!handled_one)
{
insn = PATTERN (insn);
do_frame_expr:
/* Check again. A parallel can save and update the same register.
We could probably check just once, here, but this is safer than
removing the check at the start of the function. */
- if (any_cfis_emitted || clobbers_queued_reg_save (insn))
- need_flush = true;
+ if (clobbers_queued_reg_save (insn))
+ dwarf2out_flush_queued_reg_saves ();
}
-
- if (need_flush)
- dwarf2out_flush_queued_reg_saves ();
}
/* Emit CFI info to change the state from OLD_ROW to NEW_ROW. */
/* Make sure any register saves are visible at the jump target. */
dwarf2out_flush_queued_reg_saves ();
+ any_cfis_emitted = false;
/* However, if there is some adjustment on the call itself, e.g.
a call_pop, that action should be considered to happen after
|| clobbers_queued_reg_save (insn)
|| find_reg_note (insn, REG_CFA_FLUSH_QUEUE, NULL))
dwarf2out_flush_queued_reg_saves ();
+ any_cfis_emitted = false;
add_cfi_insn = insn;
scan_insn_after (insn);
emitted two cfa adjustments. Do it now. */
def_cfa_1 (&this_cfa);
+ /* Minimize the number of advances by emitting the entire queue
+ once anything is emitted. */
+ if (any_cfis_emitted
+ || find_reg_note (insn, REG_CFA_FLUSH_QUEUE, NULL))
+ dwarf2out_flush_queued_reg_saves ();
+
/* Note that a test for control_flow_insn_p does exactly the
same tests as are done to actually create the edges. So
always call the routine and let it not create edges for