public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [vta] minimal IRA tweaking to get past most ICEs
@ 2008-10-29 19:38 Alexandre Oliva
  0 siblings, 0 replies; only message in thread
From: Alexandre Oliva @ 2008-10-29 19:38 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 539 bytes --]

The 2008-10-10 merge brought in IRA, which didn't expect to have to
deal with debug insns, particularly to *not* paying attention to them
while making decisions.

I still haven't found all situations in which debug insns affect IRA
(I'm part-way fixing just one such bug, not included in this patch),
but this one gets us successful compilation, at the very least.  I
haven't checked whether IRA still updates debug insns to reflect its
decisions, that's something for a later day (guality checks, I guess).

I'm installing this for now.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: vta-ira.patch --]
[-- Type: text/x-patch, Size: 2496 bytes --]

for  gcc/ChangeLog.vta
from  Alexandre Oliva  <aoliva@redhat.com>

	* ira-build.c (create_bb_allocnos): Disregard debug insns.
	* ira-conflicts.c (add_copies): Likewise.
	* ira-costs.c (scan_one_insn, process_bb_node_for_hard_reg_moves):
	Likewise.
	* ira-lives.c (process_bb_node_lives): Likewise.

Index: gcc/ira-build.c
===================================================================
--- gcc/ira-build.c.orig	2008-10-10 09:31:05.000000000 -0300
+++ gcc/ira-build.c	2008-10-13 15:43:51.000000000 -0300
@@ -1378,7 +1378,7 @@ create_bb_allocnos (ira_loop_tree_node_t
   curr_bb = bb = bb_node->bb;
   ira_assert (bb != NULL);
   FOR_BB_INSNS_REVERSE (bb, insn)
-    if (INSN_P (insn))
+    if (INSN_P (insn) && !DEBUG_INSN_P (insn))
       create_insn_allocnos (PATTERN (insn), false);
   /* It might be a allocno living through from one subloop to
      another.  */
Index: gcc/ira-conflicts.c
===================================================================
--- gcc/ira-conflicts.c.orig	2008-10-10 09:31:04.000000000 -0300
+++ gcc/ira-conflicts.c	2008-10-13 15:44:05.000000000 -0300
@@ -487,7 +487,7 @@ add_copies (ira_loop_tree_node_t loop_tr
   if (bb == NULL)
     return;
   FOR_BB_INSNS (bb, insn)
-    if (INSN_P (insn))
+    if (INSN_P (insn) && !DEBUG_INSN_P (insn))
       add_insn_allocno_copies (insn);
 }
 
Index: gcc/ira-costs.c
===================================================================
--- gcc/ira-costs.c.orig	2008-10-10 09:31:06.000000000 -0300
+++ gcc/ira-costs.c	2008-10-13 15:44:42.000000000 -0300
@@ -971,7 +971,7 @@ scan_one_insn (rtx insn)
   rtx set, note;
   int i, k;
 
-  if (!INSN_P (insn))
+  if (!INSN_P (insn) || DEBUG_INSN_P (insn))
     return insn;
 
   pat_code = GET_CODE (PATTERN (insn));
@@ -1338,7 +1338,7 @@ process_bb_node_for_hard_reg_moves (ira_
     freq = 1;
   FOR_BB_INSNS (bb, insn)
     {
-      if (! INSN_P (insn))
+      if (! INSN_P (insn) || DEBUG_INSN_P (insn))
 	continue;
       set = single_set (insn);
       if (set == NULL_RTX)
Index: gcc/ira-lives.c
===================================================================
--- gcc/ira-lives.c.orig	2008-10-10 09:31:05.000000000 -0300
+++ gcc/ira-lives.c	2008-10-13 15:41:22.000000000 -0300
@@ -705,7 +705,7 @@ process_bb_node_lives (ira_loop_tree_nod
 	  struct df_ref **def_rec, **use_rec;
 	  bool call_p;
 	  
-	  if (! INSN_P (insn))
+	  if (! INSN_P (insn) || DEBUG_INSN_P (insn))
 	    continue;
 	  
 	  if (internal_flag_ira_verbose > 2 && ira_dump_file != NULL)

[-- Attachment #3: Type: text/plain, Size: 257 bytes --]


-- 
Alexandre Oliva         http://www.lsd.ic.unicamp.br/~oliva/
Free Software Evangelist  oliva@{lsd.ic.unicamp.br, gnu.org}
FSFLA Board Member       ¡Sé Libre! => http://www.fsfla.org/
Red Hat Compiler Engineer   aoliva@{redhat.com, gcc.gnu.org}

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-10-29 19:32 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-10-29 19:38 [vta] minimal IRA tweaking to get past most ICEs Alexandre Oliva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).