State of AutoFDO in GCC

Xionghu Luo yinyuefengyi@gmail.com
Wed Jul 27 01:41:29 GMT 2022



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://gcc.gnu.org/pipermail/gcc/2021-April/235860.html
>>
>> Since then I committed a number of patches to revive AutoFDO in GCC:
>>
>> Fix a typo in an AutoFDO error 
>> string<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=23691ddd3aa3ffe55892b2bff54f9a15a89de2b4> 
>>
>> Update gen_autofdo_event.py and 
>> gcc-auto-profile.<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=01d402c5e0ac1ddf5618bbe316b50067625fda46> 
>>
>> Fixes for AutoFDO 
>> tests<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=f9ad3d5339faaaed6e15a7b27d90fbc66eb72f37> 
>>
>> Fix indir-call-prof-2.c with 
>> AutoFDO<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=0ed093c7c3f755bc1cd80e5186abeb2f5c50ee0c> 
>>
>> Fixes for AutoFDO 
>> testing<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9265b378531391498ec1727f67a45da72a6c07e9> 
>>
>> Fix indirect call inlining with 
>> AutoFDO<https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=285aa6895d479bed8e72ad363290846645b6faa0> 
>>
> 
> 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://gcc.gnu.org/git/?p=gcc.git;a=commit;h=ba125745d9e9fe90a18a2af8701b3269c5fdd468>,

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


More information about the Gcc mailing list