Change recursive prepare_block_for_update to use a worklist
authorAndrew Pinski <apinski@marvell.com>
Tue, 21 Jan 2020 08:34:42 +0000 (08:34 +0000)
committerAndrew Pinski <apinski@marvell.com>
Tue, 21 Jan 2020 11:17:26 +0000 (11:17 +0000)
commit6fc2f9337311c11dabcc464c808cbef205f17a52
tree01d4541f9ee44e2a51cb51e69c6f43312a4afcff
parentf0aec8643830a50812aeec0296086ed338aac678
Change recursive prepare_block_for_update to use a worklist

Reported as PR 93321, prepare_block_for_update with some huge
recusive inlining can go past the stack limit. Transforming this
recursive into worklist improves the stack usage here and we no
longer seg fault for the testcase.  Note the order we walk the siblings
change.

ChangeLog:
PR tree-opt/93321
* tree-into-ssa.c (prepare_block_for_update_1): Split out from ...
(prepare_block_for_update): This.  Use a worklist instead of recursing.
gcc/ChangeLog
gcc/tree-into-ssa.c