re PR middle-end/66429 (ICE in expand_GOMP_SIMD_LAST_LANE)
authorJakub Jelinek <jakub@redhat.com>
Wed, 17 Jun 2015 18:11:42 +0000 (20:11 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Wed, 17 Jun 2015 18:11:42 +0000 (20:11 +0200)
PR middle-end/66429
* omp-low.c (expand_omp_taskreg, expand_omp_target): Use child_cfun
instead of DECL_STRUCT_FUNCTION (child_fn).  Or in has_simduid_loops
and has_force_vectorize_loops flags from cfun into
child_cfun.
(expand_omp_simd): For broken loop, set cfun->has_simduid_loops
if simduid is non-NULL.
* tree-pass.h (make_pass_simduid_cleanup): New prototype.
* passes.def (pass_simduid_cleanup): Add new pass after loop
passes.
* tree-vectorizer.c (adjust_simduid_builtins): Remove one unnecessary
indirection from htab argument's type.
(shrink_simd_arrays): New function.
(vectorize_loops): Use it.  Adjust adjust_simduid_builtins caller.
Don't call adjust_simduid_builtins if there are no loops.
(pass_data_simduid_cleanup, pass_simduid_cleanup): New variables.
(pass_simduid_cleanup::execute): New method.
(make_pass_simduid_cleanup): New function.

From-SVN: r224571

gcc/ChangeLog
gcc/omp-low.c

index 8f92fecf5af7a9365e458b1d54a165a45648ad33..919a6216ee0747e00f6cff786c2ceb21e7707728 100644 (file)
@@ -1,8 +1,8 @@
 2015-06-17  Jakub Jelinek  <jakub@redhat.com>
 
        PR middle-end/66429
-       * omp-low.c (expand_omp_taskreg): Use child_cfun instead of
-       DECL_STRUCT_FUNCTION (child_fn).  Or in has_simduid_loops
+       * omp-low.c (expand_omp_taskreg, expand_omp_target): Use child_cfun
+       instead of DECL_STRUCT_FUNCTION (child_fn).  Or in has_simduid_loops
        and has_force_vectorize_loops flags from cfun into
        child_cfun.
        (expand_omp_simd): For broken loop, set cfun->has_simduid_loops
index 6325b8260107cb7a8ac55186116f05e093b27268..415a2c88a0b9dfa7ef3465a349052ca6cf43f1b8 100644 (file)
@@ -8960,7 +8960,9 @@ expand_omp_target (struct omp_region *region)
        vec_safe_truncate (child_cfun->local_decls, dstidx);
 
       /* Inform the callgraph about the new function.  */
-      DECL_STRUCT_FUNCTION (child_fn)->curr_properties = cfun->curr_properties;
+      child_cfun->curr_properties = cfun->curr_properties;
+      child_cfun->has_simduid_loops |= cfun->has_simduid_loops;
+      child_cfun->has_force_vectorize_loops |= cfun->has_force_vectorize_loops;
       cgraph_node *node = cgraph_node::get_create (child_fn);
       node->parallelized_function = 1;
       cgraph_node::add_new_function (child_fn, true);