diff mbox

Fix PGO bootstrap on x390x (PR bootstrap/78985).

Message ID 08fd2591-2e9b-7b62-aa85-f2ef57efa947@suse.cz
State New
Headers show

Commit Message

Martin Liška Jan. 30, 2017, 11:27 a.m. UTC
Hi.

Following patch simply fixes issues reported by -Wmaybe-unitialized. That enables PGO bootstrap
on a s390x machine.

Ready to be installed?
Martin

Comments

Jeff Law Jan. 31, 2017, 4:40 p.m. UTC | #1
On 01/30/2017 04:27 AM, Martin Liška wrote:
> Hi.
>
> Following patch simply fixes issues reported by -Wmaybe-unitialized. That enables PGO bootstrap
> on a s390x machine.
>
> Ready to be installed?
> Martin
>
>
> 0001-Fix-PGO-bootstrap-on-x390x-PR-bootstrap-78985.patch
>
>
> From 3f3c3fe790ebffd038a033b6946de663e2305574 Mon Sep 17 00:00:00 2001
> From: marxin <mliska@suse.cz>
> Date: Mon, 30 Jan 2017 11:09:29 +0100
> Subject: [PATCH] Fix PGO bootstrap on x390x (PR bootstrap/78985).
>
> gcc/ChangeLog:
>
> 2017-01-30  Martin Liska  <mliska@suse.cz>
>
> 	PR bootstrap/78985
> 	* config/s390/s390.c (s390_gimplify_va_arg): Initialize local
> 	variable to NULL.
Odds are jump threading didn't want do duplicate this code due to better 
CFG profile data:

  /* ... Otherwise out of the overflow area.  */

   t = ovf;
   if (size < UNITS_PER_LONG && !left_align_p)
     t = fold_build_pointer_plus_hwi (t, UNITS_PER_LONG - size);

   gimplify_expr (&t, pre_p, NULL, is_gimple_val, fb_rvalue);

   gimplify_assign (addr, t, pre_p);

   if (size < UNITS_PER_LONG && left_align_p)
     t = fold_build_pointer_plus_hwi (t, UNITS_PER_LONG);
   else
     t = fold_build_pointer_plus_hwi (t, size);

   gimplify_assign (ovf, t, pre_p);


As a result of not duplicating that code we don't thread the reg != 
NULL_TREE that guards the lab_over use.


OK for the trunk,
jeff
diff mbox

Patch

From 3f3c3fe790ebffd038a033b6946de663e2305574 Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Mon, 30 Jan 2017 11:09:29 +0100
Subject: [PATCH] Fix PGO bootstrap on x390x (PR bootstrap/78985).

gcc/ChangeLog:

2017-01-30  Martin Liska  <mliska@suse.cz>

	PR bootstrap/78985
	* config/s390/s390.c (s390_gimplify_va_arg): Initialize local
	variable to NULL.
---
 gcc/config/s390/s390.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index fe65846a4f2..3ac7df34826 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -12195,7 +12195,7 @@  s390_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
   tree f_gpr, f_fpr, f_ovf, f_sav;
   tree gpr, fpr, ovf, sav, reg, t, u;
   int indirect_p, size, n_reg, sav_ofs, sav_scale, max_reg;
-  tree lab_false, lab_over;
+  tree lab_false, lab_over = NULL_TREE;
   tree addr = create_tmp_var (ptr_type_node, "addr");
   bool left_align_p; /* How a value < UNITS_PER_LONG is aligned within
 			a stack slot.  */
-- 
2.11.0