https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95264
Richard Biener <rguenth at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |missed-optimization --- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> --- clang documentation mentions they support [[gnu::flatten]], whether implementations match here is of course another question. I guess for a convoluted cgraph our flatten implementation leaves sth to be desired - if there's two calls to the same function we inline it fully twice and have to reap benefits of inlining all calls (recursively) in them twice rather than producing an optimized body for the flatten inlining first. One could envision some early cloning for the purpose of flattening, pushing down the flattening attribute to the clones that end up being inlined multiple times. Not sure how easy that would be - Honza?