diff options
author | Alexander Monakov <amonakov@gcc.gnu.org> | 2016-12-21 17:20:09 +0300 |
---|---|---|
committer | Alexander Monakov <amonakov@gcc.gnu.org> | 2016-12-21 17:20:09 +0300 |
commit | 40829cb8f55428914e5e548868785b7df86d7c02 (patch) | |
tree | 2c89c2bca6c1c92ea3784850a695c2532b80f66a /gcc | |
parent | adc86fa52f4acec9cc8dc7243510d9c4eeee53d7 (diff) | |
download | gcc-40829cb8f55428914e5e548868785b7df86d7c02.zip gcc-40829cb8f55428914e5e548868785b7df86d7c02.tar.gz gcc-40829cb8f55428914e5e548868785b7df86d7c02.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 10 | ||||
-rw-r--r-- | gcc/config/nvptx/nvptx.c | 7 |
2 files changed, 12 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bd41f38..81d2165 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,6 +1,12 @@ -2016-12-22 Andrew Pinski <apinski@cavium.com> +2016-12-21 Alexander Monakov <amonakov@ispras.ru> - * match.pd (max:c @0 (plus@2 @0 INTEGER_CST@1)): New Pattern. + 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. (min:c @0 (plus@2 @0 INTEGER_CST@1)) : New Pattern. 2016-12-20 James Greenhalgh <james.greenhalghj@arm.com> diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c index 17fe551..b3f025f 100644 --- a/gcc/config/nvptx/nvptx.c +++ b/gcc/config/nvptx/nvptx.c @@ -1048,9 +1048,10 @@ init_softstack_frame (FILE *file, unsigned alignment, HOST_WIDE_INT size) bits, reg_stack, reg_frame, size); /* Usually 'crtl->is_leaf' is computed during register allocator - initialization, which is not done on NVPTX. Compute it now. */ - gcc_assert (!crtl->is_leaf); - crtl->is_leaf = leaf_function_p (); + initialization (which is not done on NVPTX) or for pressure-sensitive + optimizations. Initialize it here, except if already set. */ + if (!crtl->is_leaf) + crtl->is_leaf = leaf_function_p (); if (!crtl->is_leaf) fprintf (file, "\t\tst.shared.u%d [%s], %s;\n", bits, reg_sspslot, reg_stack); |