On Fri, Mar 24, 2017 at 08:36:16PM +0100, Jakub Jelinek wrote: > On Fri, Mar 24, 2017 at 11:56:05AM -0600, Jeff Law wrote: > > > We could e.g. > > > #ifndef REG_CFA_NOTE > > > # define REG_CFA_NOTE(NAME) REG_NOTE(NAME) > > > #endif > > > and then > > > REG_CFA_NOTE (FRAME_RELATED_EXPR) > > > etc. in reg-notes.def (and document that REG_CFA_NOTE should be used for > > > notes related to CFA). > > > Then in cfgcleanups.c we could just > > > #undef REG_CFA_NOTE > > > #define DEF_REG_NOTE(NAME) > > > #define REG_CFA_NOTE(NAME) REG_##NAME, > > > #include "reg-notes.def" > > > #undef DEF_REG_NOTE > > > #undef REG_CFA_NOTE > > > to populate the cfa_note_kinds array. > > Something like that seems preferable -- I think we're a lot more likely to > > catch the need to use REG_CFA_NOTE when defining the notes in reg-notes.def > > than we are to remember to update an array in a different file. > > So like this (if it passes bootstrap/regtest on x86_64, i686 and > powerpc64le)? > > 2017-03-24 Jakub Jelinek <ja...@redhat.com> > > PR target/80102 > * reg-notes.def (REG_CFA_NOTE): Define. Use it for CFA related > notes. > * cfgcleanup.c (old_insns_match_p): Don't cross-jump in between /f > and non-/f instructions. If both i1 and i2 are frame related, > verify all CFA notes, their order and content. > > * g++.dg/opt/pr80102.C: New test.
Successfully bootstrapped/regtested on {x86_64,i686,powerpc64le}-linux, ok for trunk? Jakub