Re: [PATCH 1/4] gensupport: Centralize machine-generator output management
"Robin Dapp" <[email protected]> Wed, 05 Aug 2026 17:22:01 +0200
| Newsgroups | gmane.comp.gcc.patches |
|---|---|
| Message-ID | <[email protected]> |
> From: Kyrylo Tkachov <[email protected]> > > genemit and genrecog use the same size-based output selection, but each > generator owns its file names, opens files during option parsing, and closes > them separately. Adding more partitioned generators would copy this logic. > > Put the common output record and lifecycle helpers in gensupport. The helpers > validate names, delay file opening until option parsing is complete, select > only partition outputs by current size, and close every output with a useful > diagnostic. Fixed outputs, such as headers, use the same record but do not > participate in selection. > > Convert genemit and genrecog to the common interface. Also remove the unused > output index and disabled round-robin code from choose_output, and remove a > genrecog selection whose result is discarded. Diagnose missing or repeated > genrecog -H options, remove its fixed header-name limit, and stop printing > parsed output options to standard output. This mostly reads like a more verbose changelog and doesn't really give a rationale. For example: While it might be ok to rip out the non-ftell approach, why did you do it? Or rather, if it's unnecessary, why not remove its origin in genmatch as well? Granted, back when introducing this to gensupport, I didn't really verify if we need it but simply copied. To my knowledge nobody ever used this particular de-feature. But IMHO now would be the time to check :) -- Regards Robin