On 8/12/19 2:54 AM, Olivier Hainque wrote: > Hi Jeff, > > Thanks for your prompt feedback :-) > >>> * rtl.h (tablejump_casesi_pattern): New helper, casesi >>> recognition logic originating from code in cfgrtl.c. >>> * cfgrtl.c (patch_jump_insn): Use it. >>> * dwarf2cfi.c (create_trace_edges): Handle casesi patterns. > >> Is there a reason to think the routine is performance critical enough to >> be inlined? > > No, no particular reason. Just an implicit thought that having a new > state as close as possible from the previous one was of interest. > >> If not it would make more sense to me to put it into rtl.c >> with just a declaration in rtl.h > >> So if it is performance critical, then the patch is OK as-is. If not, >> moving the implementation into rtl.c with a declaration in rtl.h should >> be considered pre-approved -- just post it here for archival purposes. > > Understood, thanks! > > Searching for tablejump related prototypes in rtl.h led to > declarations for functions in rtlanal.c. Wouldn't that be a > better place than rtl.c for the new function ? I think part of the reason I settled on rtl.c was because we're not really just looking at the form, not doing any real "analysis". BUt I think either location for the implementation is fine.
jeff