Deleted Added
full compact
sched-ebb.c (117395) sched-ebb.c (119256)
1/* Instruction scheduling pass.
2 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by,
5 and currently maintained by, Jim Wilson (wilson@cygnus.com)
6
7This file is part of GCC.
8

--- 38 unchanged lines hidden (view full) ---

47/* Implementations of the sched_info functions for region scheduling. */
48static void init_ready_list PARAMS ((struct ready_list *));
49static int can_schedule_ready_p PARAMS ((rtx));
50static int new_ready PARAMS ((rtx));
51static int schedule_more_p PARAMS ((void));
52static const char *ebb_print_insn PARAMS ((rtx, int));
53static int rank PARAMS ((rtx, rtx));
54static int contributes_to_priority PARAMS ((rtx, rtx));
1/* Instruction scheduling pass.
2 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998,
3 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
4 Contributed by Michael Tiemann (tiemann@cygnus.com) Enhanced by,
5 and currently maintained by, Jim Wilson (wilson@cygnus.com)
6
7This file is part of GCC.
8

--- 38 unchanged lines hidden (view full) ---

47/* Implementations of the sched_info functions for region scheduling. */
48static void init_ready_list PARAMS ((struct ready_list *));
49static int can_schedule_ready_p PARAMS ((rtx));
50static int new_ready PARAMS ((rtx));
51static int schedule_more_p PARAMS ((void));
52static const char *ebb_print_insn PARAMS ((rtx, int));
53static int rank PARAMS ((rtx, rtx));
54static int contributes_to_priority PARAMS ((rtx, rtx));
55static void compute_jump_reg_dependencies PARAMS ((rtx, regset));
55static void compute_jump_reg_dependencies PARAMS ((rtx, regset, regset,
56 regset));
56static void schedule_ebb PARAMS ((rtx, rtx));
57
58/* Return nonzero if there are more insns that should be scheduled. */
59
60static int
61schedule_more_p ()
62{
63 return sched_n_insns < target_n_insns;

--- 91 unchanged lines hidden (view full) ---

155
156static int
157contributes_to_priority (next, insn)
158 rtx next ATTRIBUTE_UNUSED, insn ATTRIBUTE_UNUSED;
159{
160 return 1;
161}
162
57static void schedule_ebb PARAMS ((rtx, rtx));
58
59/* Return nonzero if there are more insns that should be scheduled. */
60
61static int
62schedule_more_p ()
63{
64 return sched_n_insns < target_n_insns;

--- 91 unchanged lines hidden (view full) ---

156
157static int
158contributes_to_priority (next, insn)
159 rtx next ATTRIBUTE_UNUSED, insn ATTRIBUTE_UNUSED;
160{
161 return 1;
162}
163
163/* INSN is a JUMP_INSN. Store the set of registers that must be considered
164 to be set by this jump in SET. */
164/* INSN is a JUMP_INSN, COND_SET is the set of registers that are
165 conditionally set before INSN. Store the set of registers that
166 must be considered as used by this jump in USED and that of
167 registers that must be considered as set in SET. */
165
166static void
168
169static void
167compute_jump_reg_dependencies (insn, set)
170compute_jump_reg_dependencies (insn, cond_set, used, set)
168 rtx insn;
171 rtx insn;
169 regset set;
172 regset cond_set, used, set;
170{
171 basic_block b = BLOCK_FOR_INSN (insn);
172 edge e;
173 for (e = b->succ; e; e = e->succ_next)
173{
174 basic_block b = BLOCK_FOR_INSN (insn);
175 edge e;
176 for (e = b->succ; e; e = e->succ_next)
174 if ((e->flags & EDGE_FALLTHRU) == 0)
175 {
176 bitmap_operation (set, set, e->dest->global_live_at_start,
177 BITMAP_IOR);
178 }
177 if (e->flags & EDGE_FALLTHRU)
178 /* The jump may be a by-product of a branch that has been merged
179 in the main codepath after being conditionalized. Therefore
180 it may guard the fallthrough block from using a value that has
181 conditionally overwritten that of the main codepath. So we
182 consider that it restores the value of the main codepath. */
183 bitmap_operation (set, e->dest->global_live_at_start, cond_set,
184 BITMAP_AND);
185 else
186 bitmap_operation (used, used, e->dest->global_live_at_start,
187 BITMAP_IOR);
179}
180
181/* Used in schedule_insns to initialize current_sched_info for scheduling
182 regions (or single basic blocks). */
183
184static struct sched_info ebb_sched_info =
185{
186 init_ready_list,

--- 171 unchanged lines hidden ---
188}
189
190/* Used in schedule_insns to initialize current_sched_info for scheduling
191 regions (or single basic blocks). */
192
193static struct sched_info ebb_sched_info =
194{
195 init_ready_list,

--- 171 unchanged lines hidden ---