aboutsummaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2021-08-04 09:22:51 +0200
committerRichard Biener <rguenther@suse.de>2021-08-04 10:35:27 +0200
commit4d562591018a51f155a2e5d8b9f3e5860111a327 (patch)
treed9471d510954643e8739f6edb6e20c5e23eedf27 /libgcc
parent5c73b94fdc46f03c761ee5c66e30e00a2bf9ee91 (diff)
downloadgcc-4d562591018a51f155a2e5d8b9f3e5860111a327.zip
gcc-4d562591018a51f155a2e5d8b9f3e5860111a327.tar.gz
gcc-4d562591018a51f155a2e5d8b9f3e5860111a327.tar.bz2
tree-optimization/101769 - tail recursion creates possibly infinite loop
This makes tail recursion optimization produce a loop structure manually rather than relying on loop fixup. That also allows the loop to be marked as finite (it would eventually blow the stack if it were not). 2021-08-04 Richard Biener <rguenther@suse.de> PR tree-optimization/101769 * tree-tailcall.c (eliminate_tail_call): Add the created loop for the first recursion and return it via the new output parameter. (optimize_tail_call): Pass through new output param. (tree_optimize_tail_calls_1): After creating all latches, add the created loop to the loop tree. Do not mark loops for fixup. * g++.dg/tree-ssa/pr101769.C: New testcase.
Diffstat (limited to 'libgcc')
0 files changed, 0 insertions, 0 deletions