loop.c (loop_optimize): Allocate loop_info structure for each loop prior to calling scan_loop.
* loop.c (loop_optimize): Allocate loop_info structure for each loop prior to calling scan_loop. From-SVN: r31508
This commit is contained in:
parent
eda44c7832
commit
7845896296
@ -1,3 +1,8 @@
|
|||||||
|
2000-01-20 Michael Hayes <m.hayes@elec.canterbury.ac.nz>
|
||||||
|
|
||||||
|
* loop.c (loop_optimize): Allocate loop_info structure for each loop
|
||||||
|
prior to calling scan_loop.
|
||||||
|
|
||||||
Wed Jan 19 19:54:38 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
|
Wed Jan 19 19:54:38 2000 J"orn Rennecke <amylaar@cygnus.co.uk>
|
||||||
|
|
||||||
* sh.c (prepare_scc_operands): Abort if no compare insn is available.
|
* sh.c (prepare_scc_operands): Abort if no compare insn is available.
|
||||||
|
12
gcc/loop.c
12
gcc/loop.c
@ -510,15 +510,21 @@ loop_optimize (f, dumpfile, unroll_p, bct_p)
|
|||||||
this prevents low overhead loop instructions from being used. */
|
this prevents low overhead loop instructions from being used. */
|
||||||
indirect_jump_in_function = indirect_jump_in_function_p (f);
|
indirect_jump_in_function = indirect_jump_in_function_p (f);
|
||||||
|
|
||||||
/* Now scan the loops, last ones first, since this means inner ones are done
|
/* Allocate and initialize auxiliary loop information. */
|
||||||
before outer ones. */
|
|
||||||
for (i = max_loop_num - 1; i >= 0; i--)
|
for (i = max_loop_num - 1; i >= 0; i--)
|
||||||
{
|
{
|
||||||
struct loop *loop = &loops->array[i];
|
struct loop *loop = &loops->array[i];
|
||||||
|
|
||||||
loop->info = (struct loop_info *) alloca (sizeof (struct loop_info));
|
loop->info = (struct loop_info *) alloca (sizeof (struct loop_info));
|
||||||
memset (loop->info, 0, sizeof (struct loop_info));
|
memset (loop->info, 0, sizeof (struct loop_info));
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now scan the loops, last ones first, since this means inner ones are done
|
||||||
|
before outer ones. */
|
||||||
|
for (i = max_loop_num - 1; i >= 0; i--)
|
||||||
|
{
|
||||||
|
struct loop *loop = &loops->array[i];
|
||||||
|
|
||||||
if (! loop->invalid && loop->end)
|
if (! loop->invalid && loop->end)
|
||||||
scan_loop (loop, unroll_p, bct_p);
|
scan_loop (loop, unroll_p, bct_p);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user