[dataflow][RFC] Use real struct_value_rtx target hook

Kaz Kojima kkojima@rr.iij4u.or.jp
Mon Jan 29 23:49:00 GMT 2007


Some libffi tests fails for SH.  They are using structure valued
functions and it looks that the entry_block doesn't set the register
for the structure value as used.  The attached patch is to fix
this with calling calls.struct_value_rtx target hook instead of
TARGET_STRUCT_VALUE_RTX which is replaced with hook_rtx_tree_int_null
in df-scan.c.  Bootstrapped and regtested on i686-pc-linux-gnu and
sh4-unknown-linux-gnu with no new failures.

Regards,
	kaz
--
	* df-scan.c (df_get_entry_block_def_set): Use struct_value_rtx
	hook instead of TARGET_STRUCT_VALUE_RTX.

diff -uprN ORIG/dataflow/gcc/df-scan.c LOCAL/dataflow/gcc/df-scan.c
--- ORIG/dataflow/gcc/df-scan.c	2007-01-24 09:06:41.000000000 +0900
+++ LOCAL/dataflow/gcc/df-scan.c	2007-01-27 21:25:15.000000000 +0900
@@ -1,5 +1,5 @@
 /* Scanning of rtl for dataflow analysis.
-   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+   Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
    Free Software Foundation, Inc.
    Originally contributed by Michael P. Hayes 
              (m.hayes@elec.canterbury.ac.nz, mhayes@redhat.com)
@@ -3262,7 +3262,7 @@ df_get_entry_block_def_set (bitmap entry
 #endif
 #endif
       
-      r = TARGET_STRUCT_VALUE_RTX (current_function_decl, true);
+      r = targetm.calls.struct_value_rtx (current_function_decl, true);
       if (r && REG_P (r))
 	bitmap_set_bit (entry_block_defs, REGNO (r));
     }



More information about the Gcc-patches mailing list