Remove warnings in ssa-ccp.c

Billinghurst, David (CRTS) David.Billinghurst@riotinto.com
Mon Jul 9 19:12:00 GMT 2001


This patches removes a few warnings in ssa-ccp.c.  It include previous patch
declaring ssa-fast-dec. I am not sure about the "int i" -> "unsigned int i"
in ssa_ccp_substitute_constants 

2001-07-10  David Billinghurst <David.Billinghurst@riotinto.com

	* ssa.h: Add prototype for ssa_const_prop
	ssa-ccp.c: Add prototype for ssa_fast_dce and mark_references
	(ssa_ccp_substitute_constants): Fix signed vs unsigned comparison
	(ssa_fast_dce): Remove unused variable

diff -u -r1.4 ssa.h
--- ssa.h       2001/06/29 20:35:53     1.4
+++ ssa.h       2001/07/10 02:07:25
@@ -34,6 +34,8 @@
 /* Optimizations.  */
 /* In ssa-dce.c */
 extern void ssa_eliminate_dead_code    PARAMS ((void));
+/* In ssa-ccp.c */
+extern void ssa_const_prop              PARAMS ((void));
 
 /* SSA definitions and uses.  */
 /* This flag is set when the CFG is in SSA form.  */

diff -u -r1.1 ssa-ccp.c
--- ssa-ccp.c   2001/07/09 19:47:27     1.1
+++ ssa-ccp.c   2001/07/10 01:59:03
@@ -130,9 +130,11 @@
 static void defs_to_varying            PARAMS ((rtx));
 static void examine_flow_edges         PARAMS ((void));
 static void follow_def_use_chains      PARAMS ((void));
+static int mark_references PARAMS (( rtx *, void *));
 static void optimize_unexecutable_edges PARAMS ((struct edge_list *,
sbitmap));
 static void ssa_ccp_substitute_constants PARAMS ((void));
 static void ssa_ccp_df_delete_unreachable_insns PARAMS ((void));
+static void ssa_fast_dce PARAMS ((struct df *));
 
 /* Return the first PHI node in a basic block.  This routine knows
    what INSNs can start a basic block and what can validly follow
@@ -840,7 +842,7 @@
 static void
 ssa_ccp_substitute_constants ()
 {
-  int i;
+  unsigned int i;
 
   for (i = FIRST_PSEUDO_REGISTER; i < VARRAY_SIZE (ssa_definition); i++)
     {
@@ -1159,8 +1161,6 @@
       found_use = 0;
       for (curruse = df->regs[reg].uses; curruse; curruse = curruse->next)
        {
-         rtx useinsn;
-
          if (curruse->ref
              && DF_REF_INSN (curruse->ref)
              && ! INSN_DELETED_P (DF_REF_INSN (curruse->ref))




More information about the Gcc-patches mailing list