[PR 91579] Avoid creating redundant PHI nodes in tail-call pass
authorMartin Jambor <mjambor@suse.cz>
Fri, 30 Aug 2019 08:08:42 +0000 (10:08 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Fri, 30 Aug 2019 08:08:42 +0000 (10:08 +0200)
commitbb4d170d7b43be4b28ef20978ab2b453f6f2c55d
tree394953a5970e622f04c96ee0a7aec0a73949f6c8
parentffb738a286543a47682c72a9410eae3f85872580
[PR 91579] Avoid creating redundant PHI nodes in tail-call pass

2019-08-30  Martin Jambor  <mjambor@suse.cz>

tree-optimization/91579
* tree-tailcall.c (tailr_arg_needs_copy): New variable.
(find_tail_calls): Allocate tailr_arg_needs_copy and set its bits as
appropriate.
(arg_needs_copy_p): Removed.
(eliminate_tail_call): Test tailr_arg_needs_copy instead of calling
arg_needs_copy_p.
(tree_optimize_tail_calls_1): Likewise.  Free tailr_arg_needs_copy.

testsuite/
* gcc.dg/tree-ssa/pr91579.c: New test.

From-SVN: r275062
gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/tree-ssa/pr91579.c [new file with mode: 0644]
gcc/tree-tailcall.c