https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92559
--- Comment #5 from Konstantin Kharlamov ---
(In reply to Konstantin Kharlamov from comment #4)
> By the way, FTR: I don't have the code anymore, but initially the problem
> came from a real-life algorithm involving lots of state, which looked
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92559
--- Comment #4 from Konstantin Kharlamov ---
By the way, FTR: I don't have the code anymore, but initially the problem came
from a real-life algorithm involving lots of state, which looked barely
readable when implemented in iterative way (i.e.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92559
--- Comment #3 from Konstantin Kharlamov ---
(In reply to Andrew Pinski from comment #2)
> I don't think this can ever be optimized. Mainly because there are copies
> happening due to passing via value and returning by value.
Please correct me
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92559
--- Comment #2 from Andrew Pinski ---
I don't think this can ever be optimized. Mainly because there are copies
happening due to passing via value and returning by value.
If I change it to foo to MyMap (MyMap ), I get the behavior you want.
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=92559
Richard Biener changed:
What|Removed |Added
Keywords||missed-optimization