Mercurial > hg > CbC > CbC_gcc
comparison gcc/et-forest.c @ 55:77e2b8dfacca gcc-4.4.5
update it from 4.4.3 to 4.5.0
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Fri, 12 Feb 2010 23:39:51 +0900 |
parents | a06113de4d67 |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
52:c156f1bd5cd9 | 55:77e2b8dfacca |
---|---|
208 depth += occ->depth; | 208 depth += occ->depth; |
209 mn = depth; | 209 mn = depth; |
210 | 210 |
211 if (occ->prev) | 211 if (occ->prev) |
212 { | 212 { |
213 m = record_path_before_1 (occ->prev, depth); | 213 m = record_path_before_1 (occ->prev, depth); |
214 if (m < mn) | 214 if (m < mn) |
215 mn = m; | 215 mn = m; |
216 } | 216 } |
217 | 217 |
218 fprintf (stderr, "%d (%d); ", ((basic_block) occ->of->data)->index, depth); | 218 fprintf (stderr, "%d (%d); ", ((basic_block) occ->of->data)->index, depth); |
259 depth += occ->depth; | 259 depth += occ->depth; |
260 mn = depth; | 260 mn = depth; |
261 | 261 |
262 if (occ->next) | 262 if (occ->next) |
263 { | 263 { |
264 m = check_path_after_1 (occ->next, depth); | 264 m = check_path_after_1 (occ->next, depth); |
265 if (m < mn) | 265 if (m < mn) |
266 mn = m; | 266 mn = m; |
267 } | 267 } |
268 | 268 |
269 len--; | 269 len--; |
306 | 306 |
307 #ifdef DEBUG_ET | 307 #ifdef DEBUG_ET |
308 record_path_before (occ); | 308 record_path_before (occ); |
309 et_check_tree_sanity (occ); | 309 et_check_tree_sanity (occ); |
310 #endif | 310 #endif |
311 | 311 |
312 while (occ->parent) | 312 while (occ->parent) |
313 { | 313 { |
314 occ_depth = occ->depth; | 314 occ_depth = occ->depth; |
315 | 315 |
316 f = occ->parent; | 316 f = occ->parent; |
442 | 442 |
443 static struct et_occ * | 443 static struct et_occ * |
444 et_new_occ (struct et_node *node) | 444 et_new_occ (struct et_node *node) |
445 { | 445 { |
446 struct et_occ *nw; | 446 struct et_occ *nw; |
447 | 447 |
448 if (!et_occurrences) | 448 if (!et_occurrences) |
449 et_occurrences = create_alloc_pool ("et_occ pool", sizeof (struct et_occ), 300); | 449 et_occurrences = create_alloc_pool ("et_occ pool", sizeof (struct et_occ), 300); |
450 nw = (struct et_occ *) pool_alloc (et_occurrences); | 450 nw = (struct et_occ *) pool_alloc (et_occurrences); |
451 | 451 |
452 nw->of = node; | 452 nw->of = node; |
465 | 465 |
466 struct et_node * | 466 struct et_node * |
467 et_new_tree (void *data) | 467 et_new_tree (void *data) |
468 { | 468 { |
469 struct et_node *nw; | 469 struct et_node *nw; |
470 | 470 |
471 if (!et_nodes) | 471 if (!et_nodes) |
472 et_nodes = create_alloc_pool ("et_node pool", sizeof (struct et_node), 300); | 472 et_nodes = create_alloc_pool ("et_node pool", sizeof (struct et_node), 300); |
473 nw = (struct et_node *) pool_alloc (et_nodes); | 473 nw = (struct et_node *) pool_alloc (et_nodes); |
474 | 474 |
475 nw->data = data; | 475 nw->data = data; |
588 rmost = t->rightmost_occ; | 588 rmost = t->rightmost_occ; |
589 et_splay (rmost); | 589 et_splay (rmost); |
590 | 590 |
591 for (r = rmost->next; r->prev; r = r->prev) | 591 for (r = rmost->next; r->prev; r = r->prev) |
592 continue; | 592 continue; |
593 et_splay (r); | 593 et_splay (r); |
594 | 594 |
595 r->prev->parent = NULL; | 595 r->prev->parent = NULL; |
596 p_occ = t->parent_occ; | 596 p_occ = t->parent_occ; |
597 et_splay (p_occ); | 597 et_splay (p_occ); |
598 t->parent_occ = NULL; | 598 t->parent_occ = NULL; |