[patch] h8300.c: Remove redundant code.

Kazu Hirata kazu@hxi.com
Mon Jan 28 20:54:00 GMT 2002


Hi,

Attached is a patch to remove redundant code in
h8300_adjust_insn_length in h8300.c.

Tested on h8300 port.  Committed.

Kazu Hirata

2002-01-28  Kazu Hirata  <kazu@hxi.com>

	* conifg/h8300/h8300.c (h8300_adjust_insn_length): Remove
	redundant code.

Index: h8300.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.c,v
retrieving revision 1.101
diff -c -r1.101 h8300.c
*** h8300.c	2002/01/27 06:33:17	1.101
--- h8300.c	2002/01/29 04:44:44
***************
*** 3097,3116 ****
       rtx insn;
       int length ATTRIBUTE_UNUSED;
  {
!   rtx pat;
  
    /* We must filter these out before calling get_attr_adjust_length.  */
!   if (GET_CODE (PATTERN (insn)) == USE
!       || GET_CODE (PATTERN (insn)) == CLOBBER
!       || GET_CODE (PATTERN (insn)) == SEQUENCE
!       || GET_CODE (PATTERN (insn)) == ADDR_VEC
!       || GET_CODE (PATTERN (insn)) == ADDR_DIFF_VEC)
      return 0;
  
    if (get_attr_adjust_length (insn) == ADJUST_LENGTH_NO)
      return 0;
- 
-   pat = PATTERN (insn);
  
    /* Adjust length for reg->mem and mem->reg copies.  */
    if (GET_CODE (pat) == SET
--- 3097,3114 ----
       rtx insn;
       int length ATTRIBUTE_UNUSED;
  {
!   rtx pat = PATTERN (insn);
  
    /* We must filter these out before calling get_attr_adjust_length.  */
!   if (GET_CODE (pat) == USE
!       || GET_CODE (pat) == CLOBBER
!       || GET_CODE (pat) == SEQUENCE
!       || GET_CODE (pat) == ADDR_VEC
!       || GET_CODE (pat) == ADDR_DIFF_VEC)
      return 0;
  
    if (get_attr_adjust_length (insn) == ADJUST_LENGTH_NO)
      return 0;
  
    /* Adjust length for reg->mem and mem->reg copies.  */
    if (GET_CODE (pat) == SET



More information about the Gcc-patches mailing list