[PATCH 6/7] Add pass_copy_prop in pass_oacc_kernels
2014-11-25 Tom de Vries <tom@codesourcery.com>
* passes.def: Add pass_copy_prop to pass group pass_oacc_kernels.
* tree-ssa-copy.c (stmt_may_generate_copy): Handle .omp_data_i init
conservatively.
---
gcc/passes.def | 1 +
gcc/tree-ssa-copy.c | 4 ++++
2 files changed, 5 insertions(+)
@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see
NEXT_PASS (pass_ch_oacc_kernels);
NEXT_PASS (pass_tree_loop_init);
NEXT_PASS (pass_lim);
+ NEXT_PASS (pass_copy_prop);
NEXT_PASS (pass_expand_omp_ssa);
NEXT_PASS (pass_tree_loop_done);
POP_INSERT_PASSES ()
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-scalar-evolution.h"
#include "tree-ssa-dom.h"
#include "tree-ssa-loop-niter.h"
+#include "omp-low.h"
/* This file implements the copy propagation pass and provides a
@@ -110,6 +111,9 @@ stmt_may_generate_copy (gimple stmt)
if (gimple_has_volatile_ops (stmt))
return false;
+ if (gimple_stmt_omp_data_i_init_p (stmt))
+ return false;
+
/* Statements with loads and/or stores will never generate a useful copy. */
if (gimple_vuse (stmt))
return false;
--
1.9.1