diff mbox

path fixing PPC bootstrap

Message ID 54754005.6010400@redhat.com
State New
Headers show

Commit Message

Vladimir Makarov Nov. 26, 2014, 2:50 a.m. UTC
Mike Meissner pointed me out that my last patch broke PPC bootstrap.  I 
submitted a quick fix for it and now I am sending the path after 
bootstrap on ppc is done successfully.

Sorry for the inconvinience.

2014-11-25  Vladimir Makarov  <vmakarov@redhat.com>

         * ira-lives.c (process_bb_node_lives): Make code with conditional
         REAL_PIC_OFFSET_TABLE_REGNUM.

Comments

Richard Sandiford Nov. 27, 2014, 8:55 a.m. UTC | #1
Vladimir Makarov <vmakarov@redhat.com> writes:
> Mike Meissner pointed me out that my last patch broke PPC bootstrap.  I 
> submitted a quick fix for it and now I am sending the path after 
> bootstrap on ppc is done successfully.
>
> Sorry for the inconvinience.
>
> 2014-11-25  Vladimir Makarov  <vmakarov@redhat.com>
>
>          * ira-lives.c (process_bb_node_lives): Make code with conditional
>          REAL_PIC_OFFSET_TABLE_REGNUM.

REAL_PIC_OFFSET_TABLE_REGNUM is really an i386-local thing though.
There's no documentation for it in tm.texi and this is the first
use of it in generic code.

I suppose I'm just being lazy and not building and trying it out
for myself, but could you describe the original fix a bit more?
The comment says:

	  /* Processing insn usage in call insn can create conflict
	     with pic pseudo and pic hard reg and that is wrong.
	     Check this situation and fix it at the end of the insn
	     processing.  */

but where does the conflict come from?

Thanks,
Richard
diff mbox

Patch

Index: ira-lives.c
===================================================================
--- ira-lives.c	(revision 218062)
+++ ira-lives.c	(working copy)
@@ -1123,10 +1123,9 @@  process_bb_node_lives (ira_loop_tree_nod
 	 pessimistic, but it probably doesn't matter much in practice.  */
       FOR_BB_INSNS_REVERSE (bb, insn)
 	{
-	  int regno;
 	  ira_allocno_t a;
 	  df_ref def, use;
-	  bool call_p, clear_pic_use_conflict_p;
+	  bool call_p;
 
 	  if (!NONDEBUG_INSN_P (insn))
 	    continue;
@@ -1137,7 +1136,9 @@  process_bb_node_lives (ira_loop_tree_nod
 		     curr_point);
 
 	  call_p = CALL_P (insn);
-	  clear_pic_use_conflict_p = false;
+#ifdef REAL_PIC_OFFSET_TABLE_REGNUM
+	  int regno;
+	  bool clear_pic_use_conflict_p = false;
 	  /* Processing insn usage in call insn can create conflict
 	     with pic pseudo and pic hard reg and that is wrong.
 	     Check this situation and fix it at the end of the insn
@@ -1150,6 +1151,7 @@  process_bb_node_lives (ira_loop_tree_nod
 		   && ! TEST_HARD_REG_BIT (OBJECT_CONFLICT_HARD_REGS
 					   (ALLOCNO_OBJECT (a, 0)),
 					   REAL_PIC_OFFSET_TABLE_REGNUM));
+#endif
 
 	  /* Mark each defined value as live.  We need to do this for
 	     unused values because they still conflict with quantities
@@ -1302,6 +1304,7 @@  process_bb_node_lives (ira_loop_tree_nod
 		}
 	    }
 
+#ifdef REAL_PIC_OFFSET_TABLE_REGNUM
 	  if (clear_pic_use_conflict_p)
 	    {
 	      regno = REGNO (pic_offset_table_rtx);
@@ -1312,7 +1315,7 @@  process_bb_node_lives (ira_loop_tree_nod
 				  (ALLOCNO_OBJECT (a, 0)),
 				  REAL_PIC_OFFSET_TABLE_REGNUM);
 	    }
-
+#endif
 	  curr_point++;
 	}