On Wed, Mar 22, 2017 at 06:46:34PM +0300, Alexander Monakov wrote:
> @@ -4730,6 +4746,25 @@ expand_call_inline (basic_block bb, gimple *stmt, 
> copy_body_data *id)
>    if (cfun->gimple_df)
>      pt_solution_reset (&cfun->gimple_df->escaped);
>  
> +  /* Add new automatic variables to IFN_GOMP_SIMT_ENTER arguments.  */
> +  if (id->dst_simt_vars)
> +    {
> +      size_t nargs = gimple_call_num_args (simtenter_stmt);
> +      hash_set<tree> *vars = id->dst_simt_vars;
> +      auto_vec<tree> newargs (nargs + vars->elements ());
> +      for (size_t i = 0; i < nargs; i++)
> +     newargs.quick_push (gimple_call_arg (simtenter_stmt, i));
> +      for (hash_set<tree>::iterator i = vars->begin (); i != vars->end (); 
> ++i)
> +     newargs.quick_push (build1 (ADDR_EXPR,
> +                                 build_pointer_type (TREE_TYPE (*i)), *i));

Traversing a hash table where the traversal affects code generation is
-fcompare-debug unfriendly.
Do you actually need a hash_set and not say just a vec of the vars?  I can't
find where you'd actually do any lookups there, just add and traverse.

        Jakub

Reply via email to