diff mbox

Reload/i386 patch for secondary memory vs subregs

Message ID 50268DF6.3090308@codesourcery.com
State New
Headers show

Commit Message

Bernd Schmidt Aug. 11, 2012, 4:53 p.m. UTC
On 08/11/2012 04:20 PM, John David Anglin wrote:
>> 	* reload1.c (replaced_subreg): New static function.
>> 	(gen_reload): Use it when deciding whether to use secondary
>> 	memory.
> 
> This causes the following on hppa*-*-* (32-bit):
> 
> ../../gcc/gcc/reload1.c: In function 'rtx_def* gen_reload(rtx, rtx, int, reload_
> type)':
> ../../gcc/gcc/reload1.c:8494:12: error: unused variable 'tem1' [-Werror=unused-v
> ariable]
>    rtx tem, tem1, tem2;
> 	       ^
> 	       ../../gcc/gcc/reload1.c:8494:18: error: unused variable 'tem2' [-Werror=unused-variable]
> 		  rtx tem, tem1, tem2;
> 				    ^
> 				    ../../gcc/gcc/reload1.c: At global scope:
> 				    ../../gcc/gcc/reload1.c:8477:1: error: 'rtx_def* replaced_subreg(rtx)' defined but not used [-Werror=unused-function]
> 				     replaced_subreg (rtx x)
> 				      ^
> 				      cc1plus: all warnings being treated as errors
> 				      make[3]: *** [reload1.o] Error 1

Fixed.


Bernd
diff mbox

Patch

Index: gcc/ChangeLog
===================================================================
--- gcc/ChangeLog	(revision 190317)
+++ gcc/ChangeLog	(working copy)
@@ -1,3 +1,8 @@ 
+2012-08-11  Bernd Schmidt  <bernds@codesourcery.com>
+
+	* reload1.c (replaced_subreg, gen_reload): Add
+	SECONDARY_MEMORY_NEEDED ifdefs as necessary.
+
 2012-08-11  Jan Hubicka  <jh@suse.cz>
 
 	* lto-section-in.c (lto_section_name): Do not use "symtab" as part of
Index: gcc/reload1.c
===================================================================
--- gcc/reload1.c	(revision 190252)
+++ gcc/reload1.c	(working copy)
@@ -8469,6 +8469,7 @@  emit_insn_if_valid_for_reload (rtx insn)
   return NULL;
 }
 
+#ifdef SECONDARY_MEMORY_NEEDED
 /* If X is not a subreg, return it unmodified.  If it is a subreg,
    look up whether we made a replacement for the SUBREG_REG.  Return
    either the replacement or the SUBREG_REG.  */
@@ -8480,6 +8481,7 @@  replaced_subreg (rtx x)
     return find_replacement (&SUBREG_REG (x));
   return x;
 }
+#endif
 
 /* Emit code to perform a reload from IN (which may be a reload register) to
    OUT (which may also be a reload register).  IN or OUT is from operand
@@ -8491,7 +8493,10 @@  static rtx
 gen_reload (rtx out, rtx in, int opnum, enum reload_type type)
 {
   rtx last = get_last_insn ();
-  rtx tem, tem1, tem2;
+  rtx tem;
+#ifdef SECONDARY_MEMORY_NEEDED
+  rtx tem1, tem2;
+#endif
 
   /* If IN is a paradoxical SUBREG, remove it and try to put the
      opposite SUBREG on OUT.  Likewise for a paradoxical SUBREG on OUT.  */