summaryrefslogtreecommitdiff
path: root/gcc/gimplify.c
diff options
context:
space:
mode:
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-10 16:22:29 +0000
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-10 16:22:29 +0000
commite15deb4b329bf724d50139ade9b5a0e9b152b130 (patch)
treeeb1fb857e229b58695341024ec649f95610b921f /gcc/gimplify.c
parenta9c1f295d9e02e5d7ccb174df7223b9deeefbb99 (diff)
downloadgcc-e15deb4b329bf724d50139ade9b5a0e9b152b130.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144065 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gimplify.c')
-rw-r--r--gcc/gimplify.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/gimplify.c b/gcc/gimplify.c
index 6f88ec547d7..4af50291040 100644
--- a/gcc/gimplify.c
+++ b/gcc/gimplify.c
@@ -1,6 +1,6 @@
/* Tree lowering pass. This pass converts the GENERIC functions-as-trees
tree representation into the GIMPLE form.
- Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008
+ Copyright (C) 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
Free Software Foundation, Inc.
Major work done by Sebastian Pop <s.pop@laposte.net>,
Diego Novillo <dnovillo@redhat.com> and Jason Merrill <jason@redhat.com>.
@@ -1240,6 +1240,9 @@ gimplify_bind_expr (tree *expr_p, gimple_seq *pre_p)
omp_add_variable (gimplify_omp_ctxp, t, GOVD_LOCAL | GOVD_SEEN);
DECL_SEEN_IN_BIND_EXPR_P (t) = 1;
+
+ if (DECL_HARD_REGISTER (t) && !is_global_var (t) && cfun)
+ cfun->has_local_explicit_reg_vars = true;
}
/* Preliminarily mark non-addressed complex variables as eligible