comparison gcc/sched-int.h @ 67:f6334be47118

update gcc from gcc-4.6-20100522 to gcc-4.6-20110318
author nobuyasu <dimolto@cr.ie.u-ryukyu.ac.jp>
date Tue, 22 Mar 2011 17:18:12 +0900
parents b7f97abdc517
children 04ced10e8804
comparison
equal deleted inserted replaced
65:65488c3d617d 67:f6334be47118
193 }; 193 };
194 194
195 extern char *ready_try; 195 extern char *ready_try;
196 extern struct ready_list ready; 196 extern struct ready_list ready;
197 197
198 extern int max_issue (struct ready_list *, int, state_t, int *); 198 extern int max_issue (struct ready_list *, int, state_t, bool, int *);
199 199
200 extern void ebb_compute_jump_reg_dependencies (rtx, regset, regset, regset); 200 extern void ebb_compute_jump_reg_dependencies (rtx, regset, regset, regset);
201 201
202 extern edge find_fallthru_edge (basic_block); 202 extern edge find_fallthru_edge_from (basic_block);
203 203
204 extern void (* sched_init_only_bb) (basic_block, basic_block); 204 extern void (* sched_init_only_bb) (basic_block, basic_block);
205 extern basic_block (* sched_split_block) (basic_block, rtx); 205 extern basic_block (* sched_split_block) (basic_block, rtx);
206 extern basic_block sched_split_block_1 (basic_block, rtx); 206 extern basic_block sched_split_block_1 (basic_block, rtx);
207 extern basic_block (* sched_create_empty_bb) (basic_block); 207 extern basic_block (* sched_create_empty_bb) (basic_block);
446 int uses_length; 446 int uses_length;
447 int clobbers_length; 447 int clobbers_length;
448 }; 448 };
449 449
450 /* Describe state of dependencies used during sched_analyze phase. */ 450 /* Describe state of dependencies used during sched_analyze phase. */
451 struct deps 451 struct deps_desc
452 { 452 {
453 /* The *_insns and *_mems are paired lists. Each pending memory operation 453 /* The *_insns and *_mems are paired lists. Each pending memory operation
454 will have a pointer to the MEM rtx on one list and a pointer to the 454 will have a pointer to the MEM rtx on one list and a pointer to the
455 containing insn on the other list in the same place in the list. */ 455 containing insn on the other list in the same place in the list. */
456 456
544 /* True when this context should be treated as a readonly by 544 /* True when this context should be treated as a readonly by
545 the analysis. */ 545 the analysis. */
546 BOOL_BITFIELD readonly : 1; 546 BOOL_BITFIELD readonly : 1;
547 }; 547 };
548 548
549 typedef struct deps *deps_t; 549 typedef struct deps_desc *deps_t;
550 550
551 /* This structure holds some state of the current scheduling pass, and 551 /* This structure holds some state of the current scheduling pass, and
552 contains some function pointers that abstract out some of the non-generic 552 contains some function pointers that abstract out some of the non-generic
553 functionality from functions such as schedule_block or schedule_insn. 553 functionality from functions such as schedule_block or schedule_insn.
554 There is one global variable, current_sched_info, which points to the 554 There is one global variable, current_sched_info, which points to the
885 scheduled code and then will return immediately after INSN thus preserving 885 scheduled code and then will return immediately after INSN thus preserving
886 semantics of the program. */ 886 semantics of the program. */
887 #define IS_SPECULATION_BRANCHY_CHECK_P(INSN) \ 887 #define IS_SPECULATION_BRANCHY_CHECK_P(INSN) \
888 (RECOVERY_BLOCK (INSN) != NULL && RECOVERY_BLOCK (INSN) != EXIT_BLOCK_PTR) 888 (RECOVERY_BLOCK (INSN) != NULL && RECOVERY_BLOCK (INSN) != EXIT_BLOCK_PTR)
889 889
890 /* The unchanging bit tracks whether a debug insn is to be handled
891 like an insn (i.e., schedule it) or like a note (e.g., it is next
892 to a basic block boundary. */
893 #define DEBUG_INSN_SCHED_P(insn) \
894 (RTL_FLAG_CHECK1("DEBUG_INSN_SCHED_P", (insn), DEBUG_INSN)->unchanging)
895
896 /* True if INSN is a debug insn that is next to a basic block
897 boundary, i.e., it is to be handled by the scheduler like a
898 note. */
899 #define BOUNDARY_DEBUG_INSN_P(insn) \
900 (DEBUG_INSN_P (insn) && !DEBUG_INSN_SCHED_P (insn))
901 /* True if INSN is a debug insn that is not next to a basic block
902 boundary, i.e., it is to be handled by the scheduler like an
903 insn. */
904 #define SCHEDULE_DEBUG_INSN_P(insn) \
905 (DEBUG_INSN_P (insn) && DEBUG_INSN_SCHED_P (insn))
906
907 /* Dep status (aka ds_t) of the link encapsulates information, that is needed 890 /* Dep status (aka ds_t) of the link encapsulates information, that is needed
908 for speculative scheduling. Namely, it is 4 integers in the range 891 for speculative scheduling. Namely, it is 4 integers in the range
909 [0, MAX_DEP_WEAK] and 3 bits. 892 [0, MAX_DEP_WEAK] and 3 bits.
910 The integers correspond to the probability of the dependence to *not* 893 The integers correspond to the probability of the dependence to *not*
911 exist, it is the probability, that overcoming of this dependence will 894 exist, it is the probability, that overcoming of this dependence will
1196 1179
1197 /* Functions in sched-deps.c. */ 1180 /* Functions in sched-deps.c. */
1198 extern bool sched_insns_conditions_mutex_p (const_rtx, const_rtx); 1181 extern bool sched_insns_conditions_mutex_p (const_rtx, const_rtx);
1199 extern bool sched_insn_is_legitimate_for_speculation_p (const_rtx, ds_t); 1182 extern bool sched_insn_is_legitimate_for_speculation_p (const_rtx, ds_t);
1200 extern void add_dependence (rtx, rtx, enum reg_note); 1183 extern void add_dependence (rtx, rtx, enum reg_note);
1201 extern void sched_analyze (struct deps *, rtx, rtx); 1184 extern void sched_analyze (struct deps_desc *, rtx, rtx);
1202 extern void init_deps (struct deps *, bool); 1185 extern void init_deps (struct deps_desc *, bool);
1203 extern void init_deps_reg_last (struct deps *); 1186 extern void init_deps_reg_last (struct deps_desc *);
1204 extern void free_deps (struct deps *); 1187 extern void free_deps (struct deps_desc *);
1205 extern void init_deps_global (void); 1188 extern void init_deps_global (void);
1206 extern void finish_deps_global (void); 1189 extern void finish_deps_global (void);
1207 extern void deps_analyze_insn (struct deps *, rtx); 1190 extern void deps_analyze_insn (struct deps_desc *, rtx);
1208 extern void remove_from_deps (struct deps *, rtx); 1191 extern void remove_from_deps (struct deps_desc *, rtx);
1209 1192
1210 extern dw_t get_dep_weak_1 (ds_t, ds_t); 1193 extern dw_t get_dep_weak_1 (ds_t, ds_t);
1211 extern dw_t get_dep_weak (ds_t, ds_t); 1194 extern dw_t get_dep_weak (ds_t, ds_t);
1212 extern ds_t set_dep_weak (ds_t, ds_t, dw_t); 1195 extern ds_t set_dep_weak (ds_t, ds_t, dw_t);
1213 extern dw_t estimate_dep_weak (rtx, rtx); 1196 extern dw_t estimate_dep_weak (rtx, rtx);
1225 extern void haifa_note_reg_clobber (int); 1208 extern void haifa_note_reg_clobber (int);
1226 extern void haifa_note_reg_use (int); 1209 extern void haifa_note_reg_use (int);
1227 1210
1228 extern void maybe_extend_reg_info_p (void); 1211 extern void maybe_extend_reg_info_p (void);
1229 1212
1230 extern void deps_start_bb (struct deps *, rtx); 1213 extern void deps_start_bb (struct deps_desc *, rtx);
1231 extern enum reg_note ds_to_dt (ds_t); 1214 extern enum reg_note ds_to_dt (ds_t);
1232 1215
1233 extern bool deps_pools_are_empty_p (void); 1216 extern bool deps_pools_are_empty_p (void);
1234 extern void sched_free_deps (rtx, rtx, bool); 1217 extern void sched_free_deps (rtx, rtx, bool);
1235 extern void extend_dependency_caches (int, bool); 1218 extern void extend_dependency_caches (int, bool);
1267 extern void unlink_bb_notes (basic_block, basic_block); 1250 extern void unlink_bb_notes (basic_block, basic_block);
1268 extern void add_block (basic_block, basic_block); 1251 extern void add_block (basic_block, basic_block);
1269 extern rtx bb_note (basic_block); 1252 extern rtx bb_note (basic_block);
1270 extern void concat_note_lists (rtx, rtx *); 1253 extern void concat_note_lists (rtx, rtx *);
1271 extern rtx sched_emit_insn (rtx); 1254 extern rtx sched_emit_insn (rtx);
1255 extern rtx get_ready_element (int);
1256 extern int number_in_ready (void);
1272 1257
1273 1258
1274 /* Types and functions in sched-rgn.c. */ 1259 /* Types and functions in sched-rgn.c. */
1275 1260
1276 /* A region is the main entity for interblock scheduling: insns 1261 /* A region is the main entity for interblock scheduling: insns
1335 extern void debug_rgn_dependencies (int); 1320 extern void debug_rgn_dependencies (int);
1336 extern void debug_dependencies (rtx, rtx); 1321 extern void debug_dependencies (rtx, rtx);
1337 extern void free_rgn_deps (void); 1322 extern void free_rgn_deps (void);
1338 extern int contributes_to_priority (rtx, rtx); 1323 extern int contributes_to_priority (rtx, rtx);
1339 extern void extend_rgns (int *, int *, sbitmap, int *); 1324 extern void extend_rgns (int *, int *, sbitmap, int *);
1340 extern void deps_join (struct deps *, struct deps *); 1325 extern void deps_join (struct deps_desc *, struct deps_desc *);
1341 1326
1342 extern void rgn_setup_common_sched_info (void); 1327 extern void rgn_setup_common_sched_info (void);
1343 extern void rgn_setup_sched_infos (void); 1328 extern void rgn_setup_sched_infos (void);
1344 1329
1345 extern void debug_regions (void); 1330 extern void debug_regions (void);
1474 /* A cycle wrapper. */ 1459 /* A cycle wrapper. */
1475 #define FOR_EACH_DEP(INSN, LIST_TYPES, ITER, DEP) \ 1460 #define FOR_EACH_DEP(INSN, LIST_TYPES, ITER, DEP) \
1476 for ((ITER) = sd_iterator_start ((INSN), (LIST_TYPES)); \ 1461 for ((ITER) = sd_iterator_start ((INSN), (LIST_TYPES)); \
1477 sd_iterator_cond (&(ITER), &(DEP)); \ 1462 sd_iterator_cond (&(ITER), &(DEP)); \
1478 sd_iterator_next (&(ITER))) 1463 sd_iterator_next (&(ITER)))
1464
1465 #define IS_DISPATCH_ON 1
1466 #define IS_CMP 2
1467 #define DISPATCH_VIOLATION 3
1468 #define FITS_DISPATCH_WINDOW 4
1469 #define DISPATCH_INIT 5
1470 #define ADD_TO_DISPATCH_WINDOW 6
1479 1471
1480 extern int sd_lists_size (const_rtx, sd_list_types_def); 1472 extern int sd_lists_size (const_rtx, sd_list_types_def);
1481 extern bool sd_lists_empty_p (const_rtx, sd_list_types_def); 1473 extern bool sd_lists_empty_p (const_rtx, sd_list_types_def);
1482 extern void sd_init_insn (rtx); 1474 extern void sd_init_insn (rtx);
1483 extern void sd_finish_insn (rtx); 1475 extern void sd_finish_insn (rtx);