PING [Patch][Middle-end]Add -fzero-call-used-regs=[skip|used-gpr|all-gpr|used|all]
Mon Aug 24 10:50:08 GMT 2020
On Tue, 11 Aug 2020, Qing Zhao wrote:
> Hi, Alexandre,
> CC’ing Richard for his comments on this.
> > On Aug 10, 2020, at 9:39 PM, Alexandre Oliva <firstname.lastname@example.org> wrote:
> >> I think that moving how to zeroing the registers part to each target
> >> will be a better solution since each target has
> >> Better idea on how to use the most efficient insns to do the work.
> > It's certainly good to allow machine-specific optimized code sequences,
> > but it would certainly be desirable to have a machine-independent
> > fallback. It doesn't seem exceedingly hard to loop over the registers
> > and emit a (set (reg:M N) (const_int 0)) for each one that is to be
> > zeroed out.
> The current implementation already includes such machine-independent code, it should be very easy to add this.
> Richard, what’s your opinion on this?
> Do we need a machine-independent implementation to zeroing the registers for the default when the target does not provide a optimized
Well, at least silently doing nothing when the option is used would be
bad. So at least a diagnostic would be required. Note since the
option is quite elaborate on what (sub-)set of regs is supposed to be
cleared I'm not sure an implementation not involving any target hook
Richard Biener <email@example.com>
SUSE Software Solutions Germany GmbH, Maxfeldstrasse 5, 90409 Nuernberg,
Germany; GF: Felix Imendörffer; HRB 36809 (AG Nuernberg)
More information about the Gcc-patches