https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95775
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |marxin at gcc dot gnu.org Component|target |ipa Severity|normal |enhancement --- Comment #1 from Richard Biener <rguenth at gcc dot gnu.org> --- But it will blow up code-size considerably. Eventually with -flto and the library constraining on what symbols it exports one could figure the minimal set of functions with IFUNC relocations at least. Using profile-feedback might also able to concentrate on interesting functions. So without some major work I don't think simply slapping target_clones on each function is going to fly in practice. Eventually it should be possible to do sth like target_clones(auto) where with a new option, the target (or the user) can define "default" targets to clone for but the user still figures which are the important functions to optimize [and GCC may, via IPA "spread" the cloned cgraph portion a bit].