On 04/20/2016 08:22 AM, [email protected] wrote:
- remove_node_from_insn_list (insn, &nonlocal_goto_handler_labels);
+
+ unsigned int len = vec_safe_length (nonlocal_goto_handler_labels);
+ for (unsigned int i = 0; i < len; i++)
+ if ((*nonlocal_goto_handler_labels)[i] == insn)
+ {
+ nonlocal_goto_handler_labels->ordered_remove (i);
+ break;
+ }
Why not unordered_remove?
Should there be a vec-based version of remove-node_from_*_list?
+ rtx_insn *temp;
+ unsigned int i;
+ FOR_EACH_VEC_SAFE_ELT_REVERSE (nonlocal_goto_handler_labels, i, temp)
+ BLOCK_FOR_INSN (temp)->flags |= BB_NON_LOCAL_GOTO_TARGET;
Indentation looks wrong.
/* Process non-local goto edges. */
if (can_nonlocal_goto (insn))
- for (rtx_insn_list *lab = nonlocal_goto_handler_labels;
- lab;
- lab = lab->next ())
- maybe_record_trace_start_abnormal (lab->insn (), insn);
+ {
Unnecessary brace?
/* Re-insert the EH_REGION notes. */
- if (eh_note || (was_call && nonlocal_goto_handler_labels))
+ if (eh_note || (was_call && vec_safe_length (nonlocal_goto_handler_labels)))
I'm not a big fan of omitting the > 0 and using the integer as a
boolean. Multiple occurrences.
+ FOR_EACH_VEC_SAFE_ELT_REVERSE (nonlocal_goto_handler_labels, i, insn)
+ set_label_offsets (insn, NULL, 1);
Indentation.
Bernd