aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree.cc
diff options
context:
space:
mode:
authorEugene Rozenfeld <erozen@microsoft.com>2022-02-08 23:00:33 -0800
committerEugene Rozenfeld <erozen@microsoft.com>2022-02-09 23:33:10 -0800
commitba125745d9e9fe90a18a2af8701b3269c5fdd468 (patch)
treeec7c6b95fa344b78dc44cbccaeb7d02b4a6a6027 /gcc/tree.cc
parent41582f88ec01c5ce2f85ebc4ac2743eb426d6e33 (diff)
downloadgcc-ba125745d9e9fe90a18a2af8701b3269c5fdd468.zip
gcc-ba125745d9e9fe90a18a2af8701b3269c5fdd468.tar.gz
gcc-ba125745d9e9fe90a18a2af8701b3269c5fdd468.tar.bz2
AutoFDO: Don't try to promote indirect calls that result in recursive direct calls
AutoFDO tries to promote and inline all indirect calls that were promoted and inlined in the original binary and that are still hot. In the included test case, the promotion results in a direct call that is a recursive call. inline_call and optimize_inline_calls can't handle recursive calls at this stage. Currently, inline_call fails with a segmentation fault. This change leaves the indirect call alone if promotion will result in a recursive call. Tested on x86_64-pc-linux-gnu. gcc/ChangeLog: * auto-profile.cc (afdo_indirect_call): Don't attempt to promote indirect calls that will result in direct recursive calls. gcc/testsuite/ChangeLog: * g++.dg/tree-prof/indir-call-recursive-inlining.C : New test.
Diffstat (limited to 'gcc/tree.cc')
0 files changed, 0 insertions, 0 deletions