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]

[please test] RTL sharing verifier


Hi,
as mentioned in previous mail, I would like to get the RTL sharing
verifier enabled in stage1 now.  I am however aware that this is likely
going to find many positives, probably more than I can deal with myself
in resonable time.  I am attaching my current patch I know to work on
i686 to ask everyone who wants to do little RTL debugging on his
favorite target to try it out and let me know how it works and if
possible also send fixes.
I know the patch fails on PPC-linux on subreg sharing in libjava, but I
didn't had chance to investigate. 

Constants, memories and subregs assumed to be shareable are probably the
most common mistakes.

The patch contains the fixes I sent in previous mail plus neccesary
changes to enable the verifier.  If this grand plan fails, we can
probably try enabling verifier in the pass queue order and gradually fix
backends.

Honza

Index: regrename.c
===================================================================
*** regrename.c	(revision 118584)
--- regrename.c	(working copy)
*************** struct tree_opt_pass pass_regrename =
*** 1998,2004 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'n'                                   /* letter */
  };
  
--- 1998,2004 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'n'                                   /* letter */
  };
  
Index: fwprop.c
===================================================================
*** fwprop.c	(revision 118584)
--- fwprop.c	(working copy)
*************** struct tree_opt_pass pass_rtl_fwprop =
*** 982,988 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    0                                     /* letter */
  };
  
--- 982,988 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    0                                     /* letter */
  };
  
*************** struct tree_opt_pass pass_rtl_fwprop_add
*** 1029,1034 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    0                                     /* letter */
  };
--- 1029,1034 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    0                                     /* letter */
  };
Index: see.c
===================================================================
*** see.c	(revision 118584)
--- see.c	(working copy)
*************** struct tree_opt_pass pass_see =
*** 3776,3782 ****
    0,					/* properties_provided */
    0,					/* properties_destroyed */
    0,					/* todo_flags_start */
!   TODO_dump_func,			/* todo_flags_finish */
    'u'					/* letter */
  };
  
--- 3776,3782 ----
    0,					/* properties_provided */
    0,					/* properties_destroyed */
    0,					/* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'u'					/* letter */
  };
  
Index: tracer.c
===================================================================
*** tracer.c	(revision 118584)
--- tracer.c	(working copy)
*************** struct tree_opt_pass pass_tracer =
*** 411,417 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'T'                                   /* letter */
  };
  
--- 411,417 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'T'                                   /* letter */
  };
  
Index: postreload-gcse.c
===================================================================
*** postreload-gcse.c	(revision 118584)
--- postreload-gcse.c	(working copy)
*************** struct tree_opt_pass pass_gcse2 =
*** 1387,1394 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_verify_flow | TODO_ggc_collect,  /* todo_flags_finish */
    'J'                                   /* letter */
  };
  
--- 1387,1394 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_verify_flow | TODO_ggc_collect,/* todo_flags_finish */
    'J'                                   /* letter */
  };
  
Index: postreload.c
===================================================================
*** postreload.c	(revision 118584)
--- postreload.c	(working copy)
*************** struct tree_opt_pass pass_postreload_cse
*** 1597,1603 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'o'                                   /* letter */
  };
  
--- 1597,1603 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'o'                                   /* letter */
  };
  
Index: tree-pass.h
===================================================================
*** tree-pass.h	(revision 118584)
--- tree-pass.h	(working copy)
*************** struct dump_file_info
*** 166,171 ****
--- 166,172 ----
  #define TODO_cleanup_cfg        	(1 << 5)
  #define TODO_verify_loops		(1 << 6)
  #define TODO_dump_cgraph		(1 << 7)
+ #define TODO_verify_rtl_sharing		(1 << 8)
  
  /* To-do flags for calls to update_ssa.  */
  
Index: flow.c
===================================================================
*** flow.c	(revision 118584)
--- flow.c	(working copy)
*************** struct tree_opt_pass pass_life =
*** 4732,4738 ****
    0,                                    /* properties_destroyed */
    TODO_verify_flow,                     /* todo_flags_start */
    TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'f'                                   /* letter */
  };
  
--- 4732,4738 ----
    0,                                    /* properties_destroyed */
    TODO_verify_flow,                     /* todo_flags_start */
    TODO_dump_func |
!   TODO_ggc_collect | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'f'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_flow2 =
*** 4775,4781 ****
    0,                                    /* properties_destroyed */
    TODO_verify_flow,                     /* todo_flags_start */
    TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'w'                                   /* letter */
  };
  
--- 4775,4781 ----
    0,                                    /* properties_destroyed */
    TODO_verify_flow,                     /* todo_flags_start */
    TODO_dump_func |
!   TODO_ggc_collect | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'w'                                   /* letter */
  };
  
Index: modulo-sched.c
===================================================================
*** modulo-sched.c	(revision 118584)
--- modulo-sched.c	(working copy)
*************** struct tree_opt_pass pass_sms =
*** 2549,2556 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    TODO_dump_func,                       /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'm'                                   /* letter */
  };
  
--- 2549,2556 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    TODO_dump_func,                       /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    'm'                                   /* letter */
  };
  
Index: cse.c
===================================================================
*** cse.c	(revision 118584)
--- cse.c	(working copy)
*************** cse_process_notes (rtx x, rtx object)
*** 5817,5823 ****
  	    {
  	      rtx new = gen_lowpart (GET_MODE (x), ent->const_rtx);
  	      if (new)
! 		return new;
  	    }
  	}
  
--- 5817,5823 ----
  	    {
  	      rtx new = gen_lowpart (GET_MODE (x), ent->const_rtx);
  	      if (new)
! 		return copy_rtx (new);
  	    }
  	}
  
*************** struct tree_opt_pass pass_cse =
*** 7187,7194 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    's'                                   /* letter */
  };
  
--- 7187,7194 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    's'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_cse2 =
*** 7246,7253 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    't'                                   /* letter */
  };
  
--- 7246,7253 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    't'                                   /* letter */
  };
  
Index: web.c
===================================================================
*** web.c	(revision 118584)
--- web.c	(working copy)
*************** struct tree_opt_pass pass_web =
*** 318,324 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'Z'                                   /* letter */
  };
  
--- 318,324 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
    'Z'                                   /* letter */
  };
  
Index: loop-init.c
===================================================================
*** loop-init.c	(revision 118584)
--- loop-init.c	(working copy)
*************** struct tree_opt_pass pass_rtl_loop_init 
*** 190,196 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
--- 190,196 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_rtl_loop_done 
*** 235,241 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
--- 235,241 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_rtl_move_loop_
*** 268,274 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
--- 268,274 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_rtl_unswitch =
*** 301,307 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
--- 301,307 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_rtl_unroll_and
*** 345,351 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
--- 345,351 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_rtl_doloop =
*** 384,390 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
--- 384,390 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'L'                                   /* letter */
  };
  
Index: global.c
===================================================================
*** global.c	(revision 118584)
--- global.c	(working copy)
*************** struct tree_opt_pass pass_global_alloc =
*** 2544,2551 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'g'                                   /* letter */
  };
  
--- 2544,2551 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    'g'                                   /* letter */
  };
  
Index: ifcvt.c
===================================================================
*** ifcvt.c	(revision 118584)
--- ifcvt.c	(working copy)
*************** struct tree_opt_pass pass_rtl_ifcvt =
*** 3979,3985 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'C'                                   /* letter */
  };
  
--- 3979,3985 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'C'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_if_after_combi
*** 4014,4021 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'C'                                   /* letter */
  };
  
--- 4014,4021 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    'C'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_if_after_reloa
*** 4053,4060 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'E'                                   /* letter */
  };
  
--- 4053,4060 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    'E'                                   /* letter */
  };
  
Index: recog.c
===================================================================
*** recog.c	(revision 118584)
--- recog.c	(working copy)
*************** struct tree_opt_pass pass_peephole2 =
*** 3539,3545 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'z'                                   /* letter */
  };
  
--- 3539,3545 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    'z'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_split_all_insn
*** 3563,3569 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    0                                     /* letter */
  };
  
--- 3563,3569 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    0                                     /* letter */
  };
  
*************** struct tree_opt_pass pass_split_for_shor
*** 3592,3598 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    0                                     /* letter */
  };
  
--- 3592,3598 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    0                                     /* letter */
  };
  
*************** struct tree_opt_pass pass_split_before_r
*** 3628,3633 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    0                                     /* letter */
  };
--- 3628,3633 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    0                                     /* letter */
  };
Index: regmove.c
===================================================================
*** regmove.c	(revision 118584)
--- regmove.c	(working copy)
*************** struct tree_opt_pass pass_regmove =
*** 2509,2516 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'N'                                   /* letter */
  };
  
--- 2509,2516 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    'N'                                   /* letter */
  };
  
Index: local-alloc.c
===================================================================
*** local-alloc.c	(revision 118584)
--- local-alloc.c	(working copy)
*************** update_equiv_regs (void)
*** 907,913 ****
  	     REG_EQUAL note on the insn.  Since this note would be redundant,
  	     there's no point creating it earlier than here.  */
  	  if (! note && ! rtx_varies_p (src, 0))
! 	    note = set_unique_reg_note (insn, REG_EQUAL, src);
  
  	  /* Don't bother considering a REG_EQUAL note containing an EXPR_LIST
  	     since it represents a function call */
--- 907,913 ----
  	     REG_EQUAL note on the insn.  Since this note would be redundant,
  	     there's no point creating it earlier than here.  */
  	  if (! note && ! rtx_varies_p (src, 0))
! 	    note = set_unique_reg_note (insn, REG_EQUAL, copy_rtx (src));
  
  	  /* Don't bother considering a REG_EQUAL note containing an EXPR_LIST
  	     since it represents a function call */
*************** update_equiv_regs (void)
*** 953,959 ****
  	  if (note == 0 && REG_BASIC_BLOCK (regno) >= 0
  	      && MEM_P (SET_SRC (set))
  	      && validate_equiv_mem (insn, dest, SET_SRC (set)))
! 	    REG_NOTES (insn) = note = gen_rtx_EXPR_LIST (REG_EQUIV, SET_SRC (set),
  							 REG_NOTES (insn));
  
  	  if (note)
--- 953,960 ----
  	  if (note == 0 && REG_BASIC_BLOCK (regno) >= 0
  	      && MEM_P (SET_SRC (set))
  	      && validate_equiv_mem (insn, dest, SET_SRC (set)))
! 	    REG_NOTES (insn) = note = gen_rtx_EXPR_LIST (REG_EQUIV,
! 			    				 copy_rtx (SET_SRC (set)),
  							 REG_NOTES (insn));
  
  	  if (note)
*************** update_equiv_regs (void)
*** 1061,1067 ****
  	      && ! memref_used_between_p (dest, init_insn, insn))
  	    {
  	      REG_NOTES (init_insn)
! 		= gen_rtx_EXPR_LIST (REG_EQUIV, dest,
  				     REG_NOTES (init_insn));
  	      /* This insn makes the equivalence, not the one initializing
  		 the register.  */
--- 1062,1068 ----
  	      && ! memref_used_between_p (dest, init_insn, insn))
  	    {
  	      REG_NOTES (init_insn)
! 		= gen_rtx_EXPR_LIST (REG_EQUIV, copy_rtx (dest),
  				     REG_NOTES (init_insn));
  	      /* This insn makes the equivalence, not the one initializing
  		 the register.  */
*************** struct tree_opt_pass pass_local_alloc =
*** 2584,2591 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'l'                                   /* letter */
  };
  
--- 2585,2592 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    'l'                                   /* letter */
  };
  
Index: function.c
===================================================================
*** function.c	(revision 118584)
--- function.c	(working copy)
*************** instantiate_virtual_regs_in_insn (rtx in
*** 1540,1546 ****
        /* Propagate operand changes into the duplicates.  */
        for (i = 0; i < recog_data.n_dups; ++i)
  	*recog_data.dup_loc[i]
! 	  = recog_data.operand[(unsigned)recog_data.dup_num[i]];
  
        /* Force re-recognition of the instruction for validation.  */
        INSN_CODE (insn) = -1;
--- 1540,1546 ----
        /* Propagate operand changes into the duplicates.  */
        for (i = 0; i < recog_data.n_dups; ++i)
  	*recog_data.dup_loc[i]
! 	  = copy_rtx (recog_data.operand[(unsigned)recog_data.dup_num[i]]);
  
        /* Force re-recognition of the instruction for validation.  */
        INSN_CODE (insn) = -1;
*************** struct tree_opt_pass pass_instantiate_vi
*** 1730,1736 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    0                                     /* letter */
  };
  
--- 1730,1736 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    0                                     /* letter */
  };
  
Index: gcse.c
===================================================================
*** gcse.c	(revision 118584)
--- gcse.c	(working copy)
*************** try_replace_reg (rtx from, rtx to, rtx i
*** 2647,2652 ****
--- 2647,2657 ----
    int success = 0;
    rtx set = single_set (insn);
  
+   /* Usually we substitute easy stuff, so we won't copy everything.
+      We however need to take care to not duplicate non-trivial CONST
+      expressions.  */
+   to = copy_rtx (to);
+ 
    validate_replace_src_group (from, to, insn);
    if (num_changes_pending () && apply_change_group ())
      success = 1;
*************** struct tree_opt_pass pass_jump_bypass =
*** 6647,6654 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect | TODO_verify_flow,  /* todo_flags_finish */
    'G'                                   /* letter */
  };
  
--- 6652,6659 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect | TODO_verify_flow,/* todo_flags_finish */
    'G'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_gcse =
*** 6716,6723 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_verify_flow | TODO_ggc_collect,  /* todo_flags_finish */
    'G'                                   /* letter */
  };
  
--- 6721,6728 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_verify_flow | TODO_ggc_collect,/* todo_flags_finish */
    'G'                                   /* letter */
  };
  
Index: rtl-factoring.c
===================================================================
*** rtl-factoring.c	(revision 118584)
--- rtl-factoring.c	(working copy)
*************** struct tree_opt_pass pass_rtl_seqabstr =
*** 1442,1448 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'Q'                                   /* letter */
  };
--- 1442,1448 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    'Q'                                   /* letter */
  };
Index: bt-load.c
===================================================================
*** bt-load.c	(revision 118584)
--- bt-load.c	(working copy)
*************** struct tree_opt_pass pass_branch_target_
*** 1536,1541 ****
--- 1536,1542 ----
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
    TODO_dump_func |
+   TODO_verify_rtl_sharing |
    TODO_ggc_collect,                     /* todo_flags_finish */
    'd'                                   /* letter */
  };
Index: emit-rtl.c
===================================================================
*** emit-rtl.c	(revision 118584)
--- emit-rtl.c	(working copy)
*************** struct tree_opt_pass pass_unshare_all_rt
*** 2164,2170 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    0                                     /* letter */
  };
  
--- 2164,2170 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing, /* todo_flags_finish */
    0                                     /* letter */
  };
  
Index: cfgcleanup.c
===================================================================
*** cfgcleanup.c	(revision 118584)
--- cfgcleanup.c	(working copy)
*************** struct tree_opt_pass pass_jump =
*** 2291,2297 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    TODO_ggc_collect,                     /* todo_flags_start */
-   TODO_dump_func |
    TODO_verify_flow,                     /* todo_flags_finish */
    'i'                                   /* letter */
  };
--- 2291,2296 ----
*************** struct tree_opt_pass pass_jump2 =
*** 2340,2346 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    TODO_ggc_collect,                     /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'j'                                   /* letter */
  };
  
--- 2339,2345 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    TODO_ggc_collect,                     /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
    'j'                                   /* letter */
  };
  
Index: combine.c
===================================================================
*** combine.c	(revision 118584)
--- combine.c	(working copy)
*************** struct tree_opt_pass pass_combine =
*** 12626,12632 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
    TODO_ggc_collect,                     /* todo_flags_finish */
    'c'                                   /* letter */
  };
--- 12626,12632 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing |
    TODO_ggc_collect,                     /* todo_flags_finish */
    'c'                                   /* letter */
  };
Index: bb-reorder.c
===================================================================
*** bb-reorder.c	(revision 118584)
--- bb-reorder.c	(working copy)
*************** struct tree_opt_pass pass_duplicate_comp
*** 2099,2105 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    0                                     /* letter */
  };
  
--- 2099,2105 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
    0                                     /* letter */
  };
  
*************** struct tree_opt_pass pass_reorder_blocks
*** 2251,2257 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'B'                                   /* letter */
  };
  
--- 2251,2257 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
    'B'                                   /* letter */
  };
  
*************** struct tree_opt_pass pass_partition_bloc
*** 2294,2300 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    0                                     /* letter */
  };
  
--- 2294,2300 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
    0                                     /* letter */
  };
  
Index: var-tracking.c
===================================================================
*** var-tracking.c	(revision 118584)
--- var-tracking.c	(working copy)
*************** struct tree_opt_pass pass_variable_track
*** 3006,3012 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func,                       /* todo_flags_finish */
    'V'                                   /* letter */
  };
  
--- 3006,3012 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing,/* todo_flags_finish */
    'V'                                   /* letter */
  };
  
Index: reg-stack.c
===================================================================
*** reg-stack.c	(revision 118584)
--- reg-stack.c	(working copy)
*************** struct tree_opt_pass pass_stack_regs =
*** 3199,3205 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
!   TODO_ggc_collect,                     /* todo_flags_finish */
    'k'                                   /* letter */
  };
--- 3199,3205 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing
!   | TODO_ggc_collect,                   /* todo_flags_finish */
    'k'                                   /* letter */
  };
Index: sched-rgn.c
===================================================================
*** sched-rgn.c	(revision 118584)
--- sched-rgn.c	(working copy)
*************** struct tree_opt_pass pass_sched =
*** 3349,3355 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
    TODO_ggc_collect,                     /* todo_flags_finish */
    'S'                                   /* letter */
  };
--- 3349,3355 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing |
    TODO_ggc_collect,                     /* todo_flags_finish */
    'S'                                   /* letter */
  };
*************** struct tree_opt_pass pass_sched2 =
*** 3367,3373 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func |
    TODO_ggc_collect,                     /* todo_flags_finish */
    'R'                                   /* letter */
  };
--- 3367,3373 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_dump_func | TODO_verify_rtl_sharing |
    TODO_ggc_collect,                     /* todo_flags_finish */
    'R'                                   /* letter */
  };
Index: passes.c
===================================================================
*** passes.c	(revision 118584)
--- passes.c	(working copy)
*************** struct tree_opt_pass pass_postreload =
*** 290,296 ****
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_ggc_collect,                     /* todo_flags_finish */
    0					/* letter */
  };
  
--- 290,296 ----
    0,                                    /* properties_provided */
    0,                                    /* properties_destroyed */
    0,                                    /* todo_flags_start */
!   TODO_ggc_collect | TODO_verify_rtl_sharing, /* todo_flags_finish */
    0					/* letter */
  };
  
*************** execute_todo (unsigned int flags)
*** 808,813 ****
--- 808,815 ----
      verify_stmts ();
    if (flags & TODO_verify_loops)
      verify_loop_closed_ssa ();
+   if (flags & TODO_verify_rtl_sharing)
+     verify_rtl_sharing ();
  #endif
  
    last_verified = flags & TODO_verify_all;
Index: config/i386/i386.c
===================================================================
*** config/i386/i386.c	(revision 118584)
--- config/i386/i386.c	(working copy)
*************** emit_i387_cw_initialization (int mode)
*** 8589,8595 ****
    rtx reg = gen_reg_rtx (HImode);
  
    emit_insn (gen_x86_fnstcw_1 (stored_mode));
!   emit_move_insn (reg, stored_mode);
  
    if (TARGET_64BIT || TARGET_PARTIAL_REG_STALL || optimize_size)
      {
--- 8589,8595 ----
    rtx reg = gen_reg_rtx (HImode);
  
    emit_insn (gen_x86_fnstcw_1 (stored_mode));
!   emit_move_insn (reg, copy_rtx (stored_mode));
  
    if (TARGET_64BIT || TARGET_PARTIAL_REG_STALL || optimize_size)
      {
*************** assign_386_stack_local (enum machine_mod
*** 13520,13526 ****
  
    for (s = ix86_stack_locals; s; s = s->next)
      if (s->mode == mode && s->n == n)
!       return s->rtl;
  
    s = (struct stack_local_entry *)
      ggc_alloc (sizeof (struct stack_local_entry));
--- 13520,13526 ----
  
    for (s = ix86_stack_locals; s; s = s->next)
      if (s->mode == mode && s->n == n)
!       return copy_rtx (s->rtl);
  
    s = (struct stack_local_entry *)
      ggc_alloc (sizeof (struct stack_local_entry));


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