https://gcc.gnu.org/bugzilla/show_bug.cgi?id=121909
Bug ID: 121909 Summary: missed partial inlining Product: gcc Version: 16.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: ipa Assignee: unassigned at gcc dot gnu.org Reporter: hubicka at gcc dot gnu.org Target Milestone: --- jh@shroud:/tmp> cat t.C int *a; int *get() { if (!a) a = new (int); return a; } jh@shroud:/tmp> gcc -O3 t.C -fdump-tree-fnsplit-details-blocks -flto this should split get so the fast path should be inlined. However we get: Basic block 2 freq:1.00 size: 1 time:1.00 a.0_1 = a; freq:1.00 size: 2 time:2.00 if (a.0_1 == 0B) Basic block 3 freq:0.17 size: 3 time:2.09 _2 = operator new (4); freq:0.17 size: 1 time:0.17 a = _2; Basic block 4 freq:1.00 size: 1 time:1.00 _7 = a; freq:1.00 size: 1 time:2.00 return _7; found articulation at bb 4 Split point at BB 4 header time: 5.265900 header size: 7 split time: 3.000000 split size: 2 bbs: 4 SSA names to pass: Refused: incoming frequency is too large. found articulation at bb 2 Split point at BB 2 header time: 0.000000 header size: 0 split time: 8.265900 split size: 9 bbs: 2, 3, 4 SSA names to pass: Refused: incoming frequency is too large. Here basic block 3 is the block doing allocation, but it is not considered an articulation, so we do not split. fnsplit only considers splitting out the fast path and whole bodu (which are both rejected based on profile).