function.c (gimplify_parameters): Use build_clobber function.
authorJakub Jelinek <jakub@redhat.com>
Thu, 26 Sep 2019 20:03:12 +0000 (22:03 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 26 Sep 2019 20:03:12 +0000 (22:03 +0200)
* function.c (gimplify_parameters): Use build_clobber function.
* tree-ssa.c (execute_update_addresses_taken): Likewise.
* tree-inline.c (expand_call_inline): Likewise.
* tree-sra.c (clobber_subtree): Likewise.
* tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
* omp-low.c (lower_rec_simd_input_clauses, lower_rec_input_clauses,
lower_omp_single, lower_depend_clauses, lower_omp_taskreg,
lower_omp_target): Likewise.
* omp-expand.c (expand_omp_for_generic): Likewise.
* omp-offload.c (ompdevlow_adjust_simt_enter): Likewise.

From-SVN: r276165

gcc/ChangeLog
gcc/function.c
gcc/omp-expand.c
gcc/omp-low.c
gcc/omp-offload.c
gcc/tree-inline.c
gcc/tree-sra.c
gcc/tree-ssa-ccp.c
gcc/tree-ssa.c

index c4cd4ac9f46d0f4d15dcef58a558e339ea059be5..416bf6386b78d4361413f79f96c7d100117c8c29 100644 (file)
@@ -1,3 +1,16 @@
+2019-09-26  Jakub Jelinek  <jakub@redhat.com>
+
+       * function.c (gimplify_parameters): Use build_clobber function.
+       * tree-ssa.c (execute_update_addresses_taken): Likewise.
+       * tree-inline.c (expand_call_inline): Likewise.
+       * tree-sra.c (clobber_subtree): Likewise.
+       * tree-ssa-ccp.c (insert_clobber_before_stack_restore): Likewise.
+       * omp-low.c (lower_rec_simd_input_clauses, lower_rec_input_clauses,
+       lower_omp_single, lower_depend_clauses, lower_omp_taskreg,
+       lower_omp_target): Likewise.
+       * omp-expand.c (expand_omp_for_generic): Likewise.
+       * omp-offload.c (ompdevlow_adjust_simt_enter): Likewise.
+
 2019-09-26  Will Schmidt <will_schmidt@vnet.ibm.com>
 
        * config/rs6000/rs6000-builtin.def: (LVSL, LVSR, LVEBX, LVEHX,
index e60b6fa46a96d2c2d74cf7db84823286297b69d1..9c158cec1211683ecb621f3245d809ce10921527 100644 (file)
@@ -3892,9 +3892,8 @@ gimplify_parameters (gimple_seq *cleanup)
                  if (!is_gimple_reg (local)
                      && flag_stack_reuse != SR_NONE)
                    {
-                     tree clobber = build_constructor (type, NULL);
+                     tree clobber = build_clobber (type);
                      gimple *clobber_stmt;
-                     TREE_THIS_VOLATILE (clobber) = 1;
                      clobber_stmt = gimple_build_assign (local, clobber);
                      gimple_seq_add_stmt (cleanup, clobber_stmt);
                    }
index 94543de62031bde1760860d0503372107ea0145c..0f703bede4713f69df8f6aad3361f73072e3faae 100644 (file)
@@ -2988,8 +2988,7 @@ expand_omp_for_generic (struct omp_region *region,
                                true, GSI_SAME_STMT);
   if (arr && !TREE_STATIC (arr))
     {
-      tree clobber = build_constructor (TREE_TYPE (arr), NULL);
-      TREE_THIS_VOLATILE (clobber) = 1;
+      tree clobber = build_clobber (TREE_TYPE (arr));
       gsi_insert_before (&gsi, gimple_build_assign (arr, clobber),
                         GSI_SAME_STMT);
     }
@@ -3356,8 +3355,7 @@ expand_omp_for_generic (struct omp_region *region,
   if (fd->ordered)
     {
       tree arr = counts[fd->ordered];
-      tree clobber = build_constructor (TREE_TYPE (arr), NULL);
-      TREE_THIS_VOLATILE (clobber) = 1;
+      tree clobber = build_clobber (TREE_TYPE (arr));
       gsi_insert_after (&gsi, gimple_build_assign (arr, clobber),
                        GSI_SAME_STMT);
     }
index 444610b0096a807a52f2032e86d39cb6702d7e69..5db182c6841e20ca555d00c63eed1b2b30a97eba 100644 (file)
@@ -4044,8 +4044,7 @@ lower_rec_simd_input_clauses (tree new_var, omp_context *ctx,
       DECL_ATTRIBUTES (ivar) = tree_cons (get_identifier ("omp simt private"),
                                          NULL, DECL_ATTRIBUTES (ivar));
       sctx->simt_eargs.safe_push (build1 (ADDR_EXPR, ptype, ivar));
-      tree clobber = build_constructor (type, NULL);
-      TREE_THIS_VOLATILE (clobber) = 1;
+      tree clobber = build_clobber (type);
       gimple *g = gimple_build_assign (ivar, clobber);
       gimple_seq_add_stmt (&sctx->simt_dlist, g);
     }
@@ -5939,8 +5938,7 @@ lower_rec_input_clauses (tree clauses, gimple_seq *ilist, gimple_seq *dlist,
     }
   if (tskred_avar)
     {
-      tree clobber = build_constructor (TREE_TYPE (tskred_avar), NULL);
-      TREE_THIS_VOLATILE (clobber) = 1;
+      tree clobber = build_clobber (TREE_TYPE (tskred_avar));
       gimple_seq_add_stmt (ilist, gimple_build_assign (tskred_avar, clobber));
     }
 
@@ -7896,8 +7894,7 @@ lower_omp_single (gimple_stmt_iterator *gsi_p, omp_context *ctx)
   if (ctx->record_type)
     {
       gimple_stmt_iterator gsi = gsi_start (bind_body_tail);
-      tree clobber = build_constructor (ctx->record_type, NULL);
-      TREE_THIS_VOLATILE (clobber) = 1;
+      tree clobber = build_clobber (ctx->record_type);
       gsi_insert_after (&gsi, gimple_build_assign (ctx->sender_decl,
                                                   clobber), GSI_SAME_STMT);
     }
@@ -11029,8 +11026,7 @@ lower_depend_clauses (tree *pclauses, gimple_seq *iseq, gimple_seq *oseq)
   OMP_CLAUSE_DECL (c) = build_fold_addr_expr (array);
   OMP_CLAUSE_CHAIN (c) = *pclauses;
   *pclauses = c;
-  tree clobber = build_constructor (type, NULL);
-  TREE_THIS_VOLATILE (clobber) = 1;
+  tree clobber = build_clobber (type);
   g = gimple_build_assign (array, clobber);
   gimple_seq_add_stmt (oseq, g);
 }
@@ -11165,8 +11161,7 @@ lower_omp_taskreg (gimple_stmt_iterator *gsi_p, omp_context *ctx)
 
   if (ctx->record_type)
     {
-      tree clobber = build_constructor (TREE_TYPE (ctx->sender_decl), NULL);
-      TREE_THIS_VOLATILE (clobber) = 1;
+      tree clobber = build_clobber (TREE_TYPE (ctx->sender_decl));
       gimple_seq_add_stmt (&olist, gimple_build_assign (ctx->sender_decl,
                                                        clobber));
     }
@@ -11911,16 +11906,13 @@ lower_omp_target (gimple_stmt_iterator *gsi_p, omp_context *ctx)
                                  &initlist, true, NULL_TREE);
            gimple_seq_add_seq (&ilist, initlist);
 
-           tree clobber = build_constructor (TREE_TYPE (TREE_VEC_ELT (t, i)),
-                                             NULL);
-           TREE_THIS_VOLATILE (clobber) = 1;
+           tree clobber = build_clobber (TREE_TYPE (TREE_VEC_ELT (t, i)));
            gimple_seq_add_stmt (&olist,
                                 gimple_build_assign (TREE_VEC_ELT (t, i),
                                                      clobber));
          }
 
-      tree clobber = build_constructor (ctx->record_type, NULL);
-      TREE_THIS_VOLATILE (clobber) = 1;
+      tree clobber = build_clobber (ctx->record_type);
       gimple_seq_add_stmt (&olist, gimple_build_assign (ctx->sender_decl,
                                                        clobber));
     }
index da788d9f5141aa403a0488c0936c28658edf71f5..32eacf7863eaee82f9f8c0b55ee40d089dd3a184 100644 (file)
@@ -1855,8 +1855,7 @@ ompdevlow_adjust_simt_enter (gimple_stmt_iterator *gsi, bool *regimplify)
     {
       gcc_assert (gimple_call_internal_p (exit_stmt, IFN_GOMP_SIMT_EXIT));
       gimple_stmt_iterator exit_gsi = gsi_for_stmt (exit_stmt);
-      tree clobber = build_constructor (rectype, NULL);
-      TREE_THIS_VOLATILE (clobber) = 1;
+      tree clobber = build_clobber (rectype);
       exit_stmt = gimple_build_assign (build_simple_mem_ref (simtrec), clobber);
       gsi_insert_before (&exit_gsi, exit_stmt, GSI_SAME_STMT);
     }
index e4ae1b058fd7898ae12eb6af1c357c678f1c2834..500037c9f3f3023b620ca645bc49366af7a4e91e 100644 (file)
@@ -5016,9 +5016,8 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
          tree *varp = id->decl_map->get (p);
          if (varp && VAR_P (*varp) && !is_gimple_reg (*varp))
            {
-             tree clobber = build_constructor (TREE_TYPE (*varp), NULL);
+             tree clobber = build_clobber (TREE_TYPE (*varp));
              gimple *clobber_stmt;
-             TREE_THIS_VOLATILE (clobber) = 1;
              clobber_stmt = gimple_build_assign (*varp, clobber);
              gimple_set_location (clobber_stmt, gimple_location (stmt));
              gsi_insert_before (&stmt_gsi, clobber_stmt, GSI_SAME_STMT);
@@ -5086,9 +5085,8 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
          && !is_gimple_reg (id->retvar)
          && !stmt_ends_bb_p (stmt))
        {
-         tree clobber = build_constructor (TREE_TYPE (id->retvar), NULL);
+         tree clobber = build_clobber (TREE_TYPE (id->retvar));
          gimple *clobber_stmt;
-         TREE_THIS_VOLATILE (clobber) = 1;
          clobber_stmt = gimple_build_assign (id->retvar, clobber);
          gimple_set_location (clobber_stmt, gimple_location (old_stmt));
          gsi_insert_after (&stmt_gsi, clobber_stmt, GSI_SAME_STMT);
@@ -5134,9 +5132,8 @@ expand_call_inline (basic_block bb, gimple *stmt, copy_body_data *id)
               && !TREE_THIS_VOLATILE (id->retvar)
               && !is_gimple_reg (id->retvar))
        {
-         tree clobber = build_constructor (TREE_TYPE (id->retvar), NULL);
+         tree clobber = build_clobber (TREE_TYPE (id->retvar));
          gimple *clobber_stmt;
-         TREE_THIS_VOLATILE (clobber) = 1;
          clobber_stmt = gimple_build_assign (id->retvar, clobber);
          gimple_set_location (clobber_stmt, gimple_location (stmt));
          gsi_replace (&stmt_gsi, clobber_stmt, false);
index ba6d540658754a2b736ffc0570075a86d7e9addf..c462ca46e7d50b32663adfa8cdf90696bf0eea33 100644 (file)
@@ -3028,8 +3028,7 @@ clobber_subtree (struct access *access, gimple_stmt_iterator *gsi,
   if (access->grp_to_be_replaced)
     {
       tree rep = get_access_replacement (access);
-      tree clobber = build_constructor (access->type, NULL);
-      TREE_THIS_VOLATILE (clobber) = 1;
+      tree clobber = build_clobber (access->type);
       gimple *stmt = gimple_build_assign (rep, clobber);
 
       if (insert_after)
index 311918bfaf7b651c525b889783a257cb1fbad74c..a8d0738fbb0e706ff3d819a7b4325037d8eb27ab 100644 (file)
@@ -2093,9 +2093,7 @@ insert_clobber_before_stack_restore (tree saved_val, tree var,
   FOR_EACH_IMM_USE_STMT (stmt, iter, saved_val)
     if (gimple_call_builtin_p (stmt, BUILT_IN_STACK_RESTORE))
       {
-       clobber = build_constructor (TREE_TYPE (var),
-                                    NULL);
-       TREE_THIS_VOLATILE (clobber) = 1;
+       clobber = build_clobber (TREE_TYPE (var));
        clobber_stmt = gimple_build_assign (var, clobber);
 
        i = gsi_for_stmt (stmt);
index b4b5c903e13b1695daeff66a680c64fa7da0829d..24dd8b32f7edd0abb299b7566d8e91808625ba16 100644 (file)
@@ -2016,9 +2016,7 @@ execute_update_addresses_taken (void)
                            /* In ASAN_MARK (UNPOISON, &b, ...) the variable
                               is uninitialized.  Avoid dependencies on
                               previous out of scope value.  */
-                           tree clobber
-                             = build_constructor (TREE_TYPE (var), NULL);
-                           TREE_THIS_VOLATILE (clobber) = 1;
+                           tree clobber = build_clobber (TREE_TYPE (var));
                            gimple *g = gimple_build_assign (var, clobber);
                            gsi_replace (&gsi, g, GSI_SAME_STMT);
                          }