Lines Matching refs:Arc
45 static int cmp_arc (Arc *, Arc *);
55 (Arc **, unsigned long, int, Arc **, unsigned long *);
218 - if one arc is a self arc, it's least.
219 - if one arc is within a cycle, it's less than.
220 - if both arcs are within a cycle, compare arc counts.
221 - if neither arc is within a cycle, compare with
223 arc count as minor key. */
226 cmp_arc (Arc *left, Arc *right)
314 Arc *arc, *detached, sorted, *prev;
318 *arc the arc you have detached and are inserting.
320 sorted arc list onto which you insertion sort.
321 *prev arc before the arc you are comparing. */
324 for (arc = child->cg.parents; arc; arc = detached)
326 detached = arc->next_parent;
328 /* Consider *arc as disconnected; insert it into sorted. */
331 if (cmp_arc (arc, prev->next_parent) != GREATERTHAN)
335 arc->next_parent = prev->next_parent;
336 prev->next_parent = arc;
348 Arc *arc;
367 for (arc = child->cg.parents; arc; arc = arc->next_parent)
369 parent = arc->parent;
378 arc->count, "");
389 arc->time / hz, arc->child_time / hz,
390 arc->count, cycle_head->ncalls);
401 Arc *arc, *detached, sorted, *prev;
405 *arc the arc you have detached and are inserting.
407 sorted arc list onto which you insertion sort.
408 *prev arc before the arc you are comparing. */
411 for (arc = parent->cg.children; arc; arc = detached)
413 detached = arc->next_child;
415 /* Consider *arc as disconnected; insert it into sorted. */
418 if (cmp_arc (arc, prev->next_child) != LESSTHAN)
422 arc->next_child = prev->next_child;
423 prev->next_child = arc;
435 Arc *arc;
438 arc = parent->cg.children;
440 for (arc = parent->cg.children; arc; arc = arc->next_child)
442 child = arc->child;
450 "", "", "", "", arc->count, "");
461 arc->time / hz, arc->child_time / hz,
462 arc->count, child->cg.cyc.head->ncalls);
681 const Arc **npp1 = (const Arc **) left;
682 const Arc **npp2 = (const Arc **) right;
717 the total arc count) for functions which have several parents.
747 * Propagate arc usage changes as functions are placed. Ie if
763 arc counts.
772 * Propagation of arc usages should also improve .o link line
773 ordering which shares the same arc placement algorithm with
790 Arc **unplaced_arcs, **high_arcs, **scratch_arcs;
804 high_arcs = (Arc **) xmalloc (numarcs * sizeof (Arc *));
805 scratch_arcs = (Arc **) xmalloc (numarcs * sizeof (Arc *));
806 unplaced_arcs = (Arc **) xmalloc (numarcs * sizeof (Arc *));
828 qsort (arcs, numarcs, sizeof (Arc *), cmp_arc_count);
830 /* Compute the total arc count. Also mark arcs as unplaced.
868 Arc *arc;
885 arc = sym->cg.children;
887 while (arc)
889 if (arc->parent != arc->child)
890 scratch_arcs[scratch_arc_count++] = arc;
891 arc->has_been_placed = 1;
892 arc = arc->next_child;
895 arc = sym->cg.parents;
897 while (arc)
899 if (arc->parent != arc->child)
900 scratch_arcs[scratch_arc_count++] = arc;
901 arc->has_been_placed = 1;
902 arc = arc->next_parent;
917 Arc *arc = scratch_arcs[arc_index];
919 /* If this arc refers to highly used functions, then
921 if (arc->child->has_been_placed
922 && arc->parent->has_been_placed)
927 use the main arc placement algorithm on these arcs. */
928 arc->child->has_been_placed = 0;
929 arc->parent->has_been_placed = 0;
943 qsort (high_arcs, high_arc_count, sizeof (Arc *), cmp_arc_count);
968 high_arcs = (Arc **) xmalloc (numarcs * sizeof (Arc *));
969 scratch_arcs = (Arc **) xmalloc (numarcs * sizeof (Arc *));
970 unplaced_arcs = (Arc **) xmalloc (numarcs * sizeof (Arc *));
990 Arc **the_arcs;
993 Arc **unplaced_arcs;
1003 /* If needed, compute the total arc count.
1024 /* Ignore this arc if it's already been placed. */
1032 arc, then put it on the unplaced_arc list. Similarly
1033 if both the parent and child of this arc have been placed. */
1042 anything we can do right now. We'll place this arc on the
1043 unplaced arc list in the hope that a global positioning
1101 put the arc on the unplaced arc list. */
1185 symbols, then we've got a rarely used arc.
1242 Arc **scratch_arcs;
1247 scratch_arcs = (Arc **) xmalloc (numarcs * sizeof (Arc *));