On Tue, 2020-08-25 at 23:58 -0400, Hans-Peter Nilsson wrote: > On Mon, 24 Aug 2020, Jeff Law via Gcc wrote: > > On Thu, 2020-08-20 at 21:36 +0530, Senthil Kumar Selvaraj via Gcc wrote: > > > The post-reload splitter introduces the clobber. The wiki > > > suggests that approach if most insns clobber REG_CC, perhaps because of > > > the missed optimizations you describe below? > > If most patterns set/clobber the flags, then yes, it's slightly better to > > only > > expose them after reload. Various passes that directly grub through RTL > > rather > > than using helpers like single_set will optimize things better. > > The "slightly" being omissions like the one fixed in combine.c > last month. ;-) There's one in reload too ("Discard obvious > no-ops, even without -O"), but it seems to be acting the other > way(!) Yea, this is the kind of thing I'm thinking of when I say "slightly".
> > If, for a machine where most insns clobber REG_CC, you instead > emit with the clobber initially, you can have a tidier port: one > define_subst:ed pattern instead of... How many is it with the > only-expose-after-reload method (counting define_insn, > define_split, possibly a define_expand too that wasn't there for > cc0)? Two or three, per (original) insn with cc0? It depends :-) On the H8 I've tried to focus efforts on creating the additional patterns only when they're actually helpful. So it'd normally be 2X or 3X the number of patterns, but it's slightly less on the H8. I pondered a define_subst approach, but with my lack of experience with define_subst and the head start from my son on the mechanical changes it seemed easier to just continue without define_subst. jeff