diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-02-10 17:22:29 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-02-10 17:22:29 +0100 |
commit | fc3103e7c981bfdd5c842f82ac6047256b5d1ee8 (patch) | |
tree | eb1fb857e229b58695341024ec649f95610b921f /gcc/tree-ssa-live.c | |
parent | dbf9ee15b8b1863086ac94c0e2657cd911655880 (diff) | |
download | gcc-fc3103e7c981bfdd5c842f82ac6047256b5d1ee8.zip gcc-fc3103e7c981bfdd5c842f82ac6047256b5d1ee8.tar.gz gcc-fc3103e7c981bfdd5c842f82ac6047256b5d1ee8.tar.bz2 |
re PR target/39139 (ICE with stringop and register var)
PR target/39139
* function.h (struct function): Add has_local_explicit_reg_vars
bit.
* gimplify.c (gimplify_bind_expr): Set it if local DECL_HARD_REGISTER
VAR_DECLs were seen.
* tree-ssa-live.c (remove_unused_locals): Recompute
cfun->has_local_explicit_reg_vars.
* tree-ssa-sink.c (statement_sink_location): Don't sink BLKmode
copies or clearings if cfun->has_local_explicit_reg_vars.
* gcc.target/i386/pr39139.c: New test.
From-SVN: r144065
Diffstat (limited to 'gcc/tree-ssa-live.c')
-rw-r--r-- | gcc/tree-ssa-live.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/tree-ssa-live.c b/gcc/tree-ssa-live.c index 4731518..8ebf30e 100644 --- a/gcc/tree-ssa-live.c +++ b/gcc/tree-ssa-live.c @@ -1,5 +1,5 @@ /* Liveness for SSA trees. - Copyright (C) 2003, 2004, 2005, 2007, 2008 Free Software Foundation, + Copyright (C) 2003, 2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc. Contributed by Andrew MacLeod <amacleod@redhat.com> @@ -642,6 +642,8 @@ remove_unused_locals (void) TREE_USED (e->goto_block) = true; } + cfun->has_local_explicit_reg_vars = false; + /* Remove unmarked local vars from local_decls. */ for (cell = &cfun->local_decls; *cell; ) { @@ -663,6 +665,10 @@ remove_unused_locals (void) continue; } } + else if (TREE_CODE (var) == VAR_DECL + && DECL_HARD_REGISTER (var) + && !is_global_var (var)) + cfun->has_local_explicit_reg_vars = true; cell = &TREE_CHAIN (*cell); } |