]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Improve create_tmp_reg_or_ssa_name, always create SSA name
authorRichard Biener <rguenther@suse.de>
Tue, 3 Jun 2025 13:02:16 +0000 (15:02 +0200)
committerRichard Biener <rguenther@suse.de>
Tue, 3 Jun 2025 14:59:00 +0000 (16:59 +0200)
In GIMPLE we can always use SSA names, so do that as it is cheaper.

* gimple-fold.cc (create_tmp_reg_or_ssa_name): Always
create a SSA name.

gcc/gimple-fold.cc

index 0f437616d770e13db355e043ffd457d21cb720c5..185f9db69d89a1ac11556734a48c50746be2d338 100644 (file)
@@ -198,10 +198,7 @@ can_refer_decl_in_current_unit_p (tree decl, tree from_decl)
 tree
 create_tmp_reg_or_ssa_name (tree type, gimple *stmt)
 {
-  if (gimple_in_ssa_p (cfun))
-    return make_ssa_name (type, stmt);
-  else
-    return create_tmp_reg (type);
+  return make_ssa_name (type, stmt);
 }
 
 /* CVAL is value taken from DECL_INITIAL of variable.  Try to transform it into