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]

gcse.c fix typos.


All,

This patch fixes some memory allocation typos.

Bootstrapped i686-pc-linux-gnu all languages no regression.

Graham

ChangeLog

	* gcse.c (gcse_main): Fix typos.
	(alloc_gcse_mem): Likewise.

----------------------------------------------------------------------------------------
Index: gcse.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/gcse.c,v
retrieving revision 1.169
diff -c -p -r1.169 gcse.c
*** gcse.c      2001/12/05 14:17:44     1.169
--- gcse.c      2001/12/30 07:35:17 
*************** gcse_main (f, file)
*** 831,841 ****
            {
              free_modify_mem_tables ();
              modify_mem_list
!               = (rtx *) gmalloc (n_basic_blocks * sizeof (rtx *));
              canon_modify_mem_list
!               = (rtx *) gmalloc (n_basic_blocks * sizeof (rtx *));
!             memset ((char *) modify_mem_list, 0, n_basic_blocks * sizeof (rtx *));
!             memset ((char *) canon_modify_mem_list, 0, n_basic_blocks * sizeof (rtx *));
              orig_bb_count = n_basic_blocks;
            }
          free_reg_set_mem ();
--- 831,841 ----
            {
              free_modify_mem_tables ();
              modify_mem_list
!               = (rtx *) gmalloc (n_basic_blocks * sizeof (rtx));
              canon_modify_mem_list
!               = (rtx *) gmalloc (n_basic_blocks * sizeof (rtx));
!             memset ((char *) modify_mem_list, 0, n_basic_blocks * sizeof (rtx));
!             memset ((char *) canon_modify_mem_list, 0, n_basic_blocks * sizeof (rtx));
              orig_bb_count = n_basic_blocks;
            }
*************** alloc_gcse_mem (f)
*** 1019,1028 ****
                                                       max_gcse_regno);
    /* Allocate array to keep a list of insns which modify memory in each
       basic block.  */
!   modify_mem_list = (rtx *) gmalloc (n_basic_blocks * sizeof (rtx *));
!   canon_modify_mem_list = (rtx *) gmalloc (n_basic_blocks * sizeof (rtx *));
!   memset ((char *) modify_mem_list, 0, n_basic_blocks * sizeof (rtx *));
!   memset ((char *) canon_modify_mem_list, 0, n_basic_blocks * sizeof (rtx *));
    modify_mem_list_set = BITMAP_XMALLOC ();
    canon_modify_mem_list_set = BITMAP_XMALLOC ();
  }
--- 1019,1028 ----
                                                       max_gcse_regno);
    /* Allocate array to keep a list of insns which modify memory in each
       basic block.  */
!   modify_mem_list = (rtx *) gmalloc (n_basic_blocks * sizeof (rtx));
!   canon_modify_mem_list = (rtx *) gmalloc (n_basic_blocks * sizeof (rtx));
!   memset ((char *) modify_mem_list, 0, n_basic_blocks * sizeof (rtx));
!   memset ((char *) canon_modify_mem_list, 0, n_basic_blocks * sizeof (rtx));
    modify_mem_list_set = BITMAP_XMALLOC ();
    canon_modify_mem_list_set = BITMAP_XMALLOC ();
  }
--------------------------------------------------------------------------------


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