On Fri, Mar 24, 2017 at 06:37:46PM -0500, Segher Boessenkool wrote: > On Fri, Mar 24, 2017 at 08:36:16PM +0100, Jakub Jelinek wrote: > > + /* Skip over reg notes not related to CFI information. */ > > + while (n1) > > + { > > + for (i = 0; i < ARRAY_SIZE (cfa_note_kinds) - 1; i++) > > + if (REG_NOTE_KIND (n1) == cfa_note_kinds[i]) > > + break; > > + if (i != ARRAY_SIZE (cfa_note_kinds)) > > + break; > > + n1 = XEXP (n1, 1); > > + } > > Maybe factor out reg_note_is_cfa_note and/or insns_have_identical_cfa_notes > functions?
Well, for the reg_note_is_cfa_note, actually it might be better to just have a const bool array indexed by the note enum instead of the loop, I'll implement it later. And yes, I can outline insns_have_identical_cfa_notes. Jakub