This is small cleanup now vec has safe_emplace_push. We can just call
safe_emplace_push instead of also causing make_pair.

Bootstrapped and tested on x86_64-linux-gnu.

gcc/ChangeLog:

        * tree-ssa-forwprop.cc (simplify_gimple_switch_label_vec): Use 
safe_emplace_push
        instead of `safe_push( std::make_pair (`.
        (simplify_vector_constructor): Likewise.

Signed-off-by: Andrew Pinski <quic_apin...@quicinc.com>
---
 gcc/tree-ssa-forwprop.cc | 7 +++----
 1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/gcc/tree-ssa-forwprop.cc b/gcc/tree-ssa-forwprop.cc
index 766eaf0e4e7..ab02fb23e26 100644
--- a/gcc/tree-ssa-forwprop.cc
+++ b/gcc/tree-ssa-forwprop.cc
@@ -1027,8 +1027,7 @@ simplify_gimple_switch_label_vec (gswitch *stmt, tree 
index_type,
       for (ei = ei_start (gimple_bb (stmt)->succs); (e = ei_safe_edge (ei)); )
        {
          if (! bitmap_bit_p (target_blocks, e->dest->index))
-           edges_to_remove.safe_push (std::make_pair (e->src->index,
-                                                      e->dest->index));
+           edges_to_remove.safe_emplace_push (e->src->index, e->dest->index);
          else
            ei_next (&ei);
        } 
@@ -2926,7 +2925,7 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi)
                maybe_ident = false;
              if (elem != i)
                maybe_blend[j] = false;
-             elts.safe_push (std::make_pair (j, elem));
+             elts.safe_emplace_push (j, elem);
              continue;
            }
          /* Else fallthru.  */
@@ -2955,7 +2954,7 @@ simplify_vector_constructor (gimple_stmt_iterator *gsi)
          else if (!operand_equal_p (one_nonconstant, elt->value, 0))
            return false;
        }
-      elts.safe_push (std::make_pair (1, i));
+      elts.safe_emplace_push (1, i);
       maybe_ident = false;
     }
   if (i < nelts)
-- 
2.43.0

Reply via email to