summaryrefslogtreecommitdiff
path: root/gcc/cfgloop.c
diff options
context:
space:
mode:
authorZdenek Dvorak <dvorakz@suse.cz>2006-11-21 02:08:40 +0100
committerZdenek Dvorak <rakdver@gcc.gnu.org>2006-11-21 01:08:40 +0000
commit99f8a411dc763471dcd73cef8b42663e3c64c3f8 (patch)
tree62f9209bb475165a417f48acb5220a1a6c098b40 /gcc/cfgloop.c
parentca83d38556d2c0ac60a369d42258fc0a39df86bf (diff)
downloadgcc-99f8a411dc763471dcd73cef8b42663e3c64c3f8.tar.gz
cfgloopmanip.c (add_loop, [...]): Do not set level of the loop.
* cfgloopmanip.c (add_loop, duplicate_loop): Do not set level of the loop. * cfgloop.c (flow_loop_level_compute, flow_loops_level_compute): Removed. (flow_loop_dump): Do not dump loop level. (flow_loops_find): Do not call flow_loops_level_compute. * cfgloop.h (struct loop): Remove level field. From-SVN: r119040
Diffstat (limited to 'gcc/cfgloop.c')
-rw-r--r--gcc/cfgloop.c50
1 files changed, 2 insertions, 48 deletions
diff --git a/gcc/cfgloop.c b/gcc/cfgloop.c
index 4a5631df081..e00e6a62ea4 100644
--- a/gcc/cfgloop.c
+++ b/gcc/cfgloop.c
@@ -41,8 +41,6 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
#define LATCH_EDGE(E) (*(int *) (E)->aux)
static void flow_loops_cfg_dump (const struct loops *, FILE *);
-static int flow_loop_level_compute (struct loop *);
-static void flow_loops_level_compute (struct loops *);
static void establish_preds (struct loop *);
static void canonicalize_loop_headers (void);
static bool glb_enum_p (basic_block, void *);
@@ -110,9 +108,8 @@ flow_loop_dump (const struct loop *loop, FILE *file,
fprintf (file, ";; header %d, latch %d\n",
loop->header->index, loop->latch->index);
- fprintf (file, ";; depth %d, level %d, outer %ld\n",
- loop->depth, loop->level,
- (long) (loop->outer ? loop->outer->num : -1));
+ fprintf (file, ";; depth %d, outer %ld\n",
+ loop->depth, (long) (loop->outer ? loop->outer->num : -1));
fprintf (file, ";; nodes:");
bbs = get_loop_body (loop);
@@ -355,45 +352,6 @@ flow_loop_tree_node_remove (struct loop *loop)
loop->pred = NULL;
}
-/* Helper function to compute loop nesting depth and enclosed loop level
- for the natural loop specified by LOOP. Returns the loop level. */
-
-static int
-flow_loop_level_compute (struct loop *loop)
-{
- struct loop *inner;
- int level = 1;
-
- if (! loop)
- return 0;
-
- /* Traverse loop tree assigning depth and computing level as the
- maximum level of all the inner loops of this loop. The loop
- level is equivalent to the height of the loop in the loop tree
- and corresponds to the number of enclosed loop levels (including
- itself). */
- for (inner = loop->inner; inner; inner = inner->next)
- {
- int ilevel = flow_loop_level_compute (inner) + 1;
-
- if (ilevel > level)
- level = ilevel;
- }
-
- loop->level = level;
- return level;
-}
-
-/* Compute the loop nesting depth and enclosed loop level for the loop
- hierarchy tree specified by LOOPS. Return the maximum enclosed loop
- level. */
-
-static void
-flow_loops_level_compute (struct loops *loops)
-{
- flow_loop_level_compute (loops->tree_root);
-}
-
/* A callback to update latch and header info for basic block JUMP created
by redirecting an edge. */
@@ -707,10 +665,6 @@ flow_loops_find (struct loops *loops)
loop->num_nodes = flow_loop_nodes_find (loop->header, loop);
}
- /* Assign the loop nesting depth and enclosed loop level for each
- loop. */
- flow_loops_level_compute (loops);
-
loops->num = num_loops;
initialize_loops_parallel_p (loops);