From: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>
To: Xionghu Luo <yinyuefengyi@gmail.com>,
Andi Kleen <ak@linux.intel.com>,
Joseph Myers <joseph@codesourcery.com>,
Jan Hubicka <hubicka@ucw.cz>, gcc <gcc@gcc.gnu.org>
Subject: RE: [EXTERNAL] Re: State of AutoFDO in GCC
Date: Wed, 27 Jul 2022 18:38:10 +0000 [thread overview]
Message-ID: <DM5PR21MB176748287BC1523A87C6955A91979@DM5PR21MB1767.namprd21.prod.outlook.com> (raw)
In-Reply-To: <5660725f-1b1d-99d7-e0ae-be9e5d782128@gmail.com>
Hi Xionghu,
Yes, I'm pretty sure both of the fixes you mentioned are applicable to GCC 10. I'm not sure what the bar is for backporting fixes.
Jan, can you comment on that?
The fixes that Xionghu mentioned are:
Fix indirect call inlining with AutoFDO
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=285aa6895d479bed8e72ad363290846645b6faa0
AutoFDO: Don't try to promote indirect calls that result in recursive direct calls
https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ba125745d9e9fe90a18a2af8701b3269c5fdd468
Thanks,
Eugene
-----Original Message-----
From: Xionghu Luo <yinyuefengyi@gmail.com>
Sent: Tuesday, July 26, 2022 6:41 PM
To: Eugene Rozenfeld <Eugene.Rozenfeld@microsoft.com>; Andi Kleen <ak@linux.intel.com>; Joseph Myers <joseph@codesourcery.com>; Jan Hubicka <hubicka@ucw.cz>; gcc <gcc@gcc.gnu.org>
Subject: [EXTERNAL] Re: State of AutoFDO in GCC
[You don't often get email from yinyuefengyi@gmail.com. Learn why this is important at https://aka.ms/LearnAboutSenderIdentification ]
On 2022/7/27 09:31, Xionghu Luo wrote:
>
>
> On 2022/7/27 04:12, Eugene Rozenfeld via Gcc wrote:
>> Hello GCC community.
>>
>> I started this thread on the state of AutoFDO in GCC more than a year
>> ago. Here is the first message in the thread:
>> https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc
>> .gnu.org%2Fpipermail%2Fgcc%2F2021-April%2F235860.html&data=05%7C0
>> 1%7CEugene.Rozenfeld%40microsoft.com%7Ccda1f6374c584732950e08da6f7126
>> 83%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637944829019804556%7C
>> Unknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1
>> haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=t%2B94vOYKb8SDZ9i86Fnin
>> iYXt7LTGXqbrbftH1TVqEs%3D&reserved=0
>>
>> Since then I committed a number of patches to revive AutoFDO in GCC:
>>
>> Fix a typo in an AutoFDO error
>> string<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2
>> F%2Fgcc.gnu.org%2Fgit%2F%3Fp%3Dgcc.git%3Ba%3Dcommit%3Bh%3D23691ddd3aa
>> 3ffe55892b2bff54f9a15a89de2b4&data=05%7C01%7CEugene.Rozenfeld%40m
>> icrosoft.com%7Ccda1f6374c584732950e08da6f712683%7C72f988bf86f141af91a
>> b2d7cd011db47%7C1%7C0%7C637944829019804556%7CUnknown%7CTWFpbGZsb3d8ey
>> JWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C30
>> 00%7C%7C%7C&sdata=4WD%2FgKxeXEFz7V6pcqDsYxvAbSOP3ldxXHb%2FoMxV5kc
>> %3D&reserved=0>
>>
>> Update gen_autofdo_event.py and
>> gcc-auto-profile.<https://nam06.safelinks.protection.outlook.com/?url
>> =https%3A%2F%2Fgcc.gnu.org%2Fgit%2F%3Fp%3Dgcc.git%3Ba%3Dcommit%3Bh%3D
>> 01d402c5e0ac1ddf5618bbe316b50067625fda46&data=05%7C01%7CEugene.Ro
>> zenfeld%40microsoft.com%7Ccda1f6374c584732950e08da6f712683%7C72f988bf
>> 86f141af91ab2d7cd011db47%7C1%7C0%7C637944829019804556%7CUnknown%7CTWF
>> pbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6
>> Mn0%3D%7C3000%7C%7C%7C&sdata=TA%2FhV%2FKsRF3MUZmUL%2FpTWbESdx03VK
>> PIudXrrBjAMvQ%3D&reserved=0>
>>
>> Fixes for AutoFDO
>> tests<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F
>> %2Fgcc.gnu.org%2Fgit%2F%3Fp%3Dgcc.git%3Ba%3Dcommit%3Bh%3Df9ad3d5339fa
>> aaed6e15a7b27d90fbc66eb72f37&data=05%7C01%7CEugene.Rozenfeld%40mi
>> crosoft.com%7Ccda1f6374c584732950e08da6f712683%7C72f988bf86f141af91ab
>> 2d7cd011db47%7C1%7C0%7C637944829019804556%7CUnknown%7CTWFpbGZsb3d8eyJ
>> WIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C300
>> 0%7C%7C%7C&sdata=AvWCTytUxlcXq%2BpjkWJmhkmV0nH%2Fn0CzC4alU9XA9%2F
>> 4%3D&reserved=0>
>>
>> Fix indir-call-prof-2.c with
>> AutoFDO<https://nam06.safelinks.protection.outlook.com/?url=https%3A%
>> 2F%2Fgcc.gnu.org%2Fgit%2F%3Fp%3Dgcc.git%3Ba%3Dcommit%3Bh%3D0ed093c7c3
>> f755bc1cd80e5186abeb2f5c50ee0c&data=05%7C01%7CEugene.Rozenfeld%40
>> microsoft.com%7Ccda1f6374c584732950e08da6f712683%7C72f988bf86f141af91
>> ab2d7cd011db47%7C1%7C0%7C637944829019804556%7CUnknown%7CTWFpbGZsb3d8e
>> yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3
>> 000%7C%7C%7C&sdata=3dlTtTfe4XOOm6BEy5YLWG0l3WlQdfbCyFiXs3Q7W1I%3D
>> &reserved=0>
>>
>> Fixes for AutoFDO
>> testing<https://nam06.safelinks.protection.outlook.com/?url=https%3A%
>> 2F%2Fgcc.gnu.org%2Fgit%2F%3Fp%3Dgcc.git%3Ba%3Dcommit%3Bh%3D9265b37853
>> 1391498ec1727f67a45da72a6c07e9&data=05%7C01%7CEugene.Rozenfeld%40
>> microsoft.com%7Ccda1f6374c584732950e08da6f712683%7C72f988bf86f141af91
>> ab2d7cd011db47%7C1%7C0%7C637944829019804556%7CUnknown%7CTWFpbGZsb3d8e
>> yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3
>> 000%7C%7C%7C&sdata=ZWSIQ0jb6t2DZQpDb%2F7e5FqKM6KKskM%2FAYzLpxbUkp
>> 4%3D&reserved=0>
>>
>> Fix indirect call inlining with
>> AutoFDO<https://nam06.safelinks.protection.outlook.com/?url=https%3A%
>> 2F%2Fgcc.gnu.org%2Fgit%2F%3Fp%3Dgcc.git%3Ba%3Dcommit%3Bh%3D285aa6895d
>> 479bed8e72ad363290846645b6faa0&data=05%7C01%7CEugene.Rozenfeld%40
>> microsoft.com%7Ccda1f6374c584732950e08da6f712683%7C72f988bf86f141af91
>> ab2d7cd011db47%7C1%7C0%7C637944829019804556%7CUnknown%7CTWFpbGZsb3d8e
>> yJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3
>> 000%7C%7C%7C&sdata=W8kTuSjC188BYd3fkZvCK5UxWrYutosB%2FeZnWbmAbPI%
>> 3D&reserved=0>
>>
>
> This "indirect call inlining with AutoFDO" patch need to be backported
> to at least gcc-10 as it will caused stack overflow for some cases
> I've met...
Sorry, should be this:
AutoFDO: Don't try to promote indirect calls that result in recursive direct calls<https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgcc.gnu.org%2Fgit%2F%3Fp%3Dgcc.git%3Ba%3Dcommit%3Bh%3Dba125745d9e9fe90a18a2af8701b3269c5fdd468&data=05%7C01%7CEugene.Rozenfeld%40microsoft.com%7Ccda1f6374c584732950e08da6f712683%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637944829019804556%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tNqkTMULm5eS4ZZTb15Pd1bOtRj%2BvM9cGRzsW4gGJZQ%3D&reserved=0>,
Though the "indirect call inlining with AutoFDO" also need verify on old branches. indirect call format is updated with Martin's dynamic topn patch.
>
> Xionghu
next prev parent reply other threads:[~2022-07-27 18:38 UTC|newest]
Thread overview: 62+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-22 19:58 Eugene Rozenfeld
2021-04-22 20:16 ` Martin Liška
2021-04-22 22:29 ` Jan Hubicka
2021-04-23 4:14 ` Xinliang David Li
2021-04-23 7:00 ` Richard Biener
2021-04-23 7:18 ` Martin Liška
2021-04-23 9:32 ` Richard Biener
2021-04-23 16:41 ` Xinliang David Li
2021-04-23 16:54 ` Jan Hubicka
2021-04-23 17:04 ` Xinliang David Li
2021-04-23 17:16 ` Jan Hubicka
2021-04-23 17:27 ` Xinliang David Li
2021-04-23 17:28 ` Xinliang David Li
2021-04-23 19:28 ` Jan Hubicka
2021-04-23 19:58 ` Xinliang David Li
2021-04-25 19:07 ` Jan Hubicka
2021-04-25 23:18 ` Xinliang David Li
2021-04-26 4:22 ` Wei Mi
2021-04-26 15:11 ` Andi Kleen
2021-04-26 16:57 ` Xinliang David Li
2021-04-26 18:00 ` Andi Kleen
2021-04-26 18:05 ` Xinliang David Li
2021-04-26 18:40 ` Hongtao Yu
2021-04-26 19:13 ` Andi Kleen
2021-04-29 5:40 ` Andi Kleen
2021-04-29 14:45 ` 172060045
2021-04-30 21:43 ` Andi Kleen
2021-05-08 11:25 ` 172060045
2021-05-09 16:28 ` Andi Kleen
2021-05-09 17:01 ` Jan Hubicka
2021-05-10 15:36 ` Andi Kleen
2021-05-10 16:55 ` Joseph Myers
2021-05-10 17:21 ` Andi Kleen
2022-07-26 20:12 ` Eugene Rozenfeld
2022-07-26 22:37 ` David Edelsohn
2022-07-27 7:26 ` Jan Hubicka
2022-07-27 18:30 ` [EXTERNAL] " Eugene Rozenfeld
2022-07-27 18:24 ` Eugene Rozenfeld
2022-07-27 1:31 ` Xionghu Luo
2022-07-27 1:41 ` Xionghu Luo
2022-07-27 18:38 ` Eugene Rozenfeld [this message]
2021-05-10 23:46 ` Wei Mi
2021-05-22 1:28 ` [EXTERNAL] " Eugene Rozenfeld
2021-05-22 16:36 ` Wei Mi
2021-05-25 1:39 ` Eugene Rozenfeld
2021-05-25 3:11 ` Wei Mi
2021-05-25 3:33 ` Eugene Rozenfeld
2021-05-25 3:54 ` Wei Mi
2021-05-25 7:01 ` Eugene Rozenfeld
2021-05-25 16:16 ` Wei Mi
2021-05-25 20:49 ` Eugene Rozenfeld
2021-05-26 3:06 ` Wei Mi
2021-05-26 23:39 ` Eugene Rozenfeld
2021-05-27 2:51 ` Wei Mi
2021-06-12 1:14 ` Eugene Rozenfeld
2021-06-14 17:00 ` Wei Mi
2021-04-23 17:20 ` Jan Hubicka
2021-04-23 16:36 ` Xinliang David Li
2021-04-30 18:48 ` [EXTERNAL] " Eugene Rozenfeld
2021-04-30 21:45 ` Andi Kleen
2021-06-24 21:45 ` Eugene Rozenfeld
2021-04-23 1:46 ` Bin.Cheng
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=DM5PR21MB176748287BC1523A87C6955A91979@DM5PR21MB1767.namprd21.prod.outlook.com \
--to=eugene.rozenfeld@microsoft.com \
--cc=ak@linux.intel.com \
--cc=gcc@gcc.gnu.org \
--cc=hubicka@ucw.cz \
--cc=joseph@codesourcery.com \
--cc=yinyuefengyi@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).