https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89152
--- Comment #3 from rguenther at suse dot de <rguenther at suse dot de> --- On Mon, 4 Feb 2019, m...@nieper-wisskirchen.de wrote: > https://gcc.gnu.org/bugzilla/show_bug.cgi?id=89152 > > --- Comment #2 from Marc Nieper-Wißkirchen <m...@nieper-wisskirchen.de> --- > Even if Cont weren't passed in a register, the optimization of the unwrapped, > first version would be missed in the structure-wrapped, second version. > > A general solution where such simple wrappers do not harm the performance of > the generated code would be great. > > For example, it would be nice if there would be no difference to the optimizer > whether I pass two values to a procedure or one value as a structure pair. > Would a general structure unwrapping pass do it? We have this (unfortunately we plan to move it to IPA stage...), but the issue is once the structures appear in function arguments or return values the ABI has to be preserved for functions with external linkage. It's also a question of profitability - this makes it really an IPA problem which in the end will make the inlining issue not go away easily.