nvptx: do not assume that crtl->is_leaf is unset

PR target/78831
	* config/nvptx/nvptx.c (init_softstack_frame): Remove assert.  Compute
	crtl->is_leaf only if unset.  Adjust comment.

From-SVN: r243855
This commit is contained in:
Alexander Monakov 2016-12-21 17:20:09 +03:00
parent adc86fa52f
commit 40829cb8f5
2 changed files with 12 additions and 5 deletions

View File

@ -1,4 +1,10 @@
2016-12-22 Andrew Pinski <apinski@cavium.com> 2016-12-21 Alexander Monakov <amonakov@ispras.ru>
PR target/78831
* config/nvptx/nvptx.c (init_softstack_frame): Remove assert. Compute
crtl->is_leaf only if unset. Adjust comment.
2016-12-21 Andrew Pinski <apinski@cavium.com>
* match.pd (max:c @0 (plus@2 @0 INTEGER_CST@1)): New Pattern. * match.pd (max:c @0 (plus@2 @0 INTEGER_CST@1)): New Pattern.
(min:c @0 (plus@2 @0 INTEGER_CST@1)) : New Pattern. (min:c @0 (plus@2 @0 INTEGER_CST@1)) : New Pattern.

View File

@ -1048,8 +1048,9 @@ init_softstack_frame (FILE *file, unsigned alignment, HOST_WIDE_INT size)
bits, reg_stack, reg_frame, size); bits, reg_stack, reg_frame, size);
/* Usually 'crtl->is_leaf' is computed during register allocator /* Usually 'crtl->is_leaf' is computed during register allocator
initialization, which is not done on NVPTX. Compute it now. */ initialization (which is not done on NVPTX) or for pressure-sensitive
gcc_assert (!crtl->is_leaf); optimizations. Initialize it here, except if already set. */
if (!crtl->is_leaf)
crtl->is_leaf = leaf_function_p (); crtl->is_leaf = leaf_function_p ();
if (!crtl->is_leaf) if (!crtl->is_leaf)
fprintf (file, "\t\tst.shared.u%d [%s], %s;\n", fprintf (file, "\t\tst.shared.u%d [%s], %s;\n",