diff mbox series

[5/5] ssa-dce: use safe_emplace_push

Message ID 20241022152923.1489747-5-quic_apinski@quicinc.com
State New
Headers show
Series [1/5] vec: Add quick_emplace_push/safe_emplace_push | expand

Commit Message

Andrew Pinski Oct. 22, 2024, 3:29 p.m. UTC
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-dce.cc (make_forwarders_with_degenerate_phis): Use safe_emplace_push
	instead of `safe_push( std::make_pair (`.

Signed-off-by: Andrew Pinski <quic_apinski@quicinc.com>
---
 gcc/tree-ssa-dce.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/gcc/tree-ssa-dce.cc b/gcc/tree-ssa-dce.cc
index 015c17984e1..2aca62a1ae1 100644
--- a/gcc/tree-ssa-dce.cc
+++ b/gcc/tree-ssa-dce.cc
@@ -1834,7 +1834,7 @@  make_forwarders_with_degenerate_phis (function *fn)
 	  tree arg = gimple_phi_arg_def (phi, i);
 	  if (!CONSTANT_CLASS_P (arg) && TREE_CODE (arg) != SSA_NAME)
 	    need_resort = true;
-	  args.safe_push (std::make_pair (e, iterative_hash_expr (arg, 0)));
+	  args.safe_emplace_push (e, iterative_hash_expr (arg, 0));
 	}
       if (args.length () < 2)
 	continue;