diff options
author | Jeffrey A Law <law@cygnus.com> | 1999-11-02 06:39:04 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-11-01 23:39:04 -0700 |
commit | d269eb53b15547297d21c9499744084a1c042b06 (patch) | |
tree | 77412dd1786b7ff924ffc8a94d7acc85e60fa888 /gcc | |
parent | f6d204868afdac29dd604ab9ea246e4a507629d1 (diff) | |
download | gcc-d269eb53b15547297d21c9499744084a1c042b06.zip gcc-d269eb53b15547297d21c9499744084a1c042b06.tar.gz gcc-d269eb53b15547297d21c9499744084a1c042b06.tar.bz2 |
unroll.c (unroll_loop): Allocate memory for MAP using xcalloc.
* unroll.c (unroll_loop): Allocate memory for MAP using xcalloc.
Remove explicit zero initializations of entries within MAP.
From-SVN: r30337
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/unroll.c | 9 |
2 files changed, 9 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4ce7c3c..88e5413 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +Mon Nov 1 23:37:38 1999 Jeffrey A Law (law@cygnus.com) + + * unroll.c (unroll_loop): Allocate memory for MAP using xcalloc. + Remove explicit zero initializations of entries within MAP. + Mon Nov 1 18:09:14 1999 Richard Henderson <rth@cygnus.com> * reg-stack.c (convert_regs_1): Handle EH edges specially. diff --git a/gcc/unroll.c b/gcc/unroll.c index e4ed9f6..feda6e2 100644 --- a/gcc/unroll.c +++ b/gcc/unroll.c @@ -682,10 +682,11 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before, max_labelno = max_label_num (); max_insnno = get_max_uid (); - map = (struct inline_remap *) xmalloc (sizeof (struct inline_remap)); + /* Various paths through the unroll code may reach the "egress" label + without initializing fields within the map structure. - map->integrating = 0; - map->const_equiv_varray = 0; + To be safe, we use xcalloc to zero the memory. */ + map = (struct inline_remap *) xcalloc (1, sizeof (struct inline_remap)); /* Allocate the label map. */ @@ -695,8 +696,6 @@ unroll_loop (loop_end, insn_count, loop_start, end_insert_before, local_label = (char *) xcalloc (max_labelno, sizeof (char)); } - else - map->label_map = 0; /* Search the loop and mark all local labels, i.e. the ones which have to be distinct labels when copied. For all labels which might be |