https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119147
Bug ID: 119147 Summary: 525.x264_r is approx. slower with LTO+PGO than without (at -Ofast -march-native) Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: middle-end Assignee: unassigned at gcc dot gnu.org Reporter: hubicka at gcc dot gnu.org Target Milestone: --- This seems to be at least partly caused by fact that ipa-cp does not clone function with no hot calls. This is wrong. Since the function itself may spend a lot of time, we do not want to give up sine it is called just few times. The cost model should consider the expected peedup after cloning. I.e. time_benefit multiplied by sum of counts of call edges.