This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: RFA: Store the REG_BR_PROB probability directly as an int


Andreas Schwab <schwab@suse.de> writes:
> Richard Sandiford <rdsandiford@googlemail.com> writes:
>
>> REG_BR_PROB notes are stored as:
>>
>>   (expr_list:REG_BR_PROB (const_int <prob>) <chain>)
>>
>> but a full const_int rtx seems a bit heavweight when all we want is
>> a plain "int".  This patch uses:
>>
>>   (int_list:REG_BR_PROB <prob> <chain>)
>>
>> instead.
>
> I think you left out the handling of INT_LIST in eliminate_regs_1.  This
> lets me finish the build:

Sorry for the breakage.  I think we need to handle INT_LIST in the same way
as INSN_LIST though, and eliminate in XEXP (x, 1).

How about the attached?  Testing in progress...

Thanks,
Richard


gcc/
	* cse.c (count_reg_usage): Handle INT_LIST.
	* lra-eliminations.c (lra_eliminate_regs_1): Likewise.
	* reginfo.c (reg_scan_mark_refs): Likewise.
	* reload1.c (eliminate_regs_1): Likewise.

Index: gcc/cse.c
===================================================================
--- gcc/cse.c	2013-09-24 18:29:49.308378918 +0100
+++ gcc/cse.c	2013-09-24 18:29:49.460380403 +0100
@@ -6739,6 +6739,7 @@ count_reg_usage (rtx x, int *counts, rtx
       return;
 
     case INSN_LIST:
+    case INT_LIST:
       gcc_unreachable ();
 
     default:
Index: gcc/lra-eliminations.c
===================================================================
--- gcc/lra-eliminations.c	2013-09-24 18:29:49.308378918 +0100
+++ gcc/lra-eliminations.c	2013-09-24 18:29:49.461380412 +0100
@@ -471,6 +471,7 @@ lra_eliminate_regs_1 (rtx x, enum machin
       /* ... fall through ...  */
 
     case INSN_LIST:
+    case INT_LIST:
       /* Now do eliminations in the rest of the chain.	If this was
 	 an EXPR_LIST, this might result in allocating more memory than is
 	 strictly needed, but it simplifies the code.  */
Index: gcc/reginfo.c
===================================================================
--- gcc/reginfo.c	2013-09-24 18:29:49.309378928 +0100
+++ gcc/reginfo.c	2013-09-24 18:29:49.462380422 +0100
@@ -1075,6 +1075,7 @@ reg_scan_mark_refs (rtx x, rtx insn)
       break;
 
     case INSN_LIST:
+    case INT_LIST:
       if (XEXP (x, 1))
 	reg_scan_mark_refs (XEXP (x, 1), insn);
       break;
Index: gcc/reload1.c
===================================================================
--- gcc/reload1.c	2013-09-24 18:29:49.311378947 +0100
+++ gcc/reload1.c	2013-09-24 18:29:49.463380432 +0100
@@ -2776,6 +2776,7 @@ eliminate_regs_1 (rtx x, enum machine_mo
       /* ... fall through ...  */
 
     case INSN_LIST:
+    case INT_LIST:
       /* Now do eliminations in the rest of the chain.  If this was
 	 an EXPR_LIST, this might result in allocating more memory than is
 	 strictly needed, but it simplifies the code.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]