From 3dc99c19a5203597ca0bf8f39aea7028f17e80ba Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Wed, 27 Aug 2014 19:53:39 +0000 Subject: Use rtx_insn_list in various places gcc/ 2014-08-27 David Malcolm * rtl.h (free_INSN_LIST_list): Strengthen param from rtx * to rtx_insn_list **. (alloc_INSN_LIST): Strengthen return type from rtx to rtx_insn_list *. (copy_INSN_LIST): Likewise for return type and param. (concat_INSN_LIST): Likewise for both params and return type. (remove_free_INSN_LIST_elem): Strenghten first param from rtx to rtx_insn *. Strengthen second param from rtx * to rtx_insn_list **. (remove_free_INSN_LIST_node): Strenghten return type from rtx to rtx_insn *. Strengthen param from rtx * to rtx_insn_list **. * sched-int.h (struct deps_reg): Strengthen fields "uses", "sets", "implicit_sets", "control_uses", "clobbers" from rtx to rtx_insn_list *. (struct deps_desc): Likewise for fields "pending_read_insns", "pending_write_insns", "pending_jump_insns", "last_pending_memory_flush", "last_function_call", "last_function_call_may_noreturn", "sched_before_next_call", "sched_before_next_jump". (struct _haifa_deps_insn_data): Likewise for field "cond_deps". (remove_from_deps): Strengthen second param from rtx to rtx_insn *. * gcse.c (struct ls_expr): Strengthen fields "loads" and "stores" from rtx to rtx_insn_list *. (ldst_entry): Replace use of NULL_RTX with NULL when dealing with rtx_insn_list *. * haifa-sched.c (insn_queue): Strengthen this variable from rtx * to rtx_insn_list **. (dep_cost_1): Strengthen local "dep_cost_rtx_link" from rtx to rtx_insn_list *. (queue_insn): Likewise for local "link". (struct haifa_saved_data): Strengthen field "insn_queue" from rtx * to rtx_insn_list **. (save_backtrack_point): Update allocation of save->insn_queue to reflect the strengthening of elements from rtx to rtx_insn_list *. (queue_to_ready): Strengthen local "link" from rtx to rtx_insn_list *; use methods "next" and "insn" when traversing the list. (early_queue_to_ready): Likewise for locals "link", "next_link", "prev_link". (schedule_block): Update allocation of insn_queue to reflect the strengthening of elements from rtx to rtx_insn_list *. Strengthen local "link" from rtx to rtx_insn_list *, and use methods when working it. (add_to_speculative_block): Strengthen locals "twins" and "next_node" from rtx to rtx_insn_list *, and use methods when working with them. Strengthen local "twin" from rtx to rtx_insn *, eliminating a checked cast. (fix_recovery_deps): Strengthen locals "ready_list" and "link" from rtx to rtx_insn_list *, and use methods when working with them. * lists.c (alloc_INSN_LIST): Strengthen return type and local "r" from rtx to rtx_insn_list *, adding a checked cast. (free_INSN_LIST_list): Strengthen param "listp" from rtx * to rtx_insn_list **. (copy_INSN_LIST): Strengthen return type and locals "new_queue", "newlink" from rtx to rtx_insn_list *. Strengthen local "pqueue" from rtx * to rtx_insn_list **. Strengthen local "x" from rtx to rtx_insn *. (concat_INSN_LIST): Strengthen return type and local "new_rtx", from rtx to rtx_insn_list *. Use methods of the latter class. (remove_free_INSN_LIST_elem): Strengthen param "elem" from rtx to rtx_insn *, and param "listp" from rtx * to rtx_insn_list **. (remove_free_INSN_LIST_node): Strengthen return type and local "elem" from rtx to rtx_insn *. Strenghten param "listp" from rtx * to rtx_insn_list **. Strengthen local "node" from rtx to rtx_insn_list *, using "insn" method. * sched-deps.c (add_dependence_list): Strengthen param "list" from rtx to rtx_insn_list *, and use methods when working with it. (add_dependence_list_and_free): Strengthen param "listp" from rtx * to rtx_insn_list **. (remove_from_dependence_list): Strenghten param "listp" from rtx * to rtx_insn_list **, and use methods when working with *listp. (remove_from_both_dependence_lists): Strengthen param "listp" from rtx * to rtx_insn_list ** (add_insn_mem_dependence): Strengthen local "insn_list" from rtx * to rtx_insn_list **. Eliminate local "link", in favor of two new locals "insn_node" and "mem_node", an rtx_insn_list * and an rtx respectively. (deps_analyze_insn): Split out uses 'f local "t" as an INSN_LIST by introducing local "cond_deps". (remove_from_deps): Strengthen param "insn" from rtx to rtx_insn *. * sched-rgn.c (concat_insn_mem_list): Strengthen param "copy_insns" and local "new_insns" from rtx to rtx_insn_list *. Strengthen param "old_insns_p" from rtx * to rtx_insn_list **. Use methods of rtx_insn_list. * store-motion.c (struct st_expr): Strengthen fields "antic_stores" and "avail_stores" from rtx to rtx_insn_list *. (st_expr_entry): Replace NULL_RTX with NULL when dealing with rtx_insn_list *. (find_moveable_store): Split out "tmp" into multiple more-tightly scoped locals. Use methods of rtx_insn_list *. (compute_store_table): Strengthen local "tmp" from rtx to rtx_insn *. Use methods of rtx_insn_list *. From-SVN: r214590 --- gcc/sched-int.h | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'gcc/sched-int.h') diff --git a/gcc/sched-int.h b/gcc/sched-int.h index 0332751..f8e5e74 100644 --- a/gcc/sched-int.h +++ b/gcc/sched-int.h @@ -449,11 +449,11 @@ enum post_call_group /* Insns which affect pseudo-registers. */ struct deps_reg { - rtx uses; - rtx sets; - rtx implicit_sets; - rtx control_uses; - rtx clobbers; + rtx_insn_list *uses; + rtx_insn_list *sets; + rtx_insn_list *implicit_sets; + rtx_insn_list *control_uses; + rtx_insn_list *clobbers; int uses_length; int clobbers_length; }; @@ -471,19 +471,19 @@ struct deps_desc to a list more than once. */ /* An INSN_LIST containing all insns with pending read operations. */ - rtx pending_read_insns; + rtx_insn_list *pending_read_insns; /* An EXPR_LIST containing all MEM rtx's which are pending reads. */ rtx pending_read_mems; /* An INSN_LIST containing all insns with pending write operations. */ - rtx pending_write_insns; + rtx_insn_list *pending_write_insns; /* An EXPR_LIST containing all MEM rtx's which are pending writes. */ rtx pending_write_mems; /* An INSN_LIST containing all jump insns. */ - rtx pending_jump_insns; + rtx_insn_list *pending_jump_insns; /* We must prevent the above lists from ever growing too large since the number of dependencies produced is at least O(N*N), @@ -510,27 +510,27 @@ struct deps_desc alias analysis, this restriction can be relaxed. This may also be an INSN that writes memory if the pending lists grow too large. */ - rtx last_pending_memory_flush; + rtx_insn_list *last_pending_memory_flush; /* A list of the last function calls we have seen. We use a list to represent last function calls from multiple predecessor blocks. Used to prevent register lifetimes from expanding unnecessarily. */ - rtx last_function_call; + rtx_insn_list *last_function_call; /* A list of the last function calls that may not return normally we have seen. We use a list to represent last function calls from multiple predecessor blocks. Used to prevent moving trapping insns across such calls. */ - rtx last_function_call_may_noreturn; + rtx_insn_list *last_function_call_may_noreturn; /* A list of insns which use a pseudo register that does not already cross a call. We create dependencies between each of those insn and the next call insn, to ensure that they won't cross a call after scheduling is done. */ - rtx sched_before_next_call; + rtx_insn_list *sched_before_next_call; /* Similarly, a list of insns which should not cross a branch. */ - rtx sched_before_next_jump; + rtx_insn_list *sched_before_next_jump; /* Used to keep post-call pseudo/hard reg movements together with the call. */ @@ -737,7 +737,7 @@ struct _haifa_deps_insn_data /* For a conditional insn, a list of insns that could set the condition register. Used when generating control dependencies. */ - rtx cond_deps; + rtx_insn_list *cond_deps; /* True if the condition in 'cond' should be reversed to get the actual condition. */ @@ -1302,7 +1302,7 @@ extern void free_deps (struct deps_desc *); extern void init_deps_global (void); extern void finish_deps_global (void); extern void deps_analyze_insn (struct deps_desc *, rtx_insn *); -extern void remove_from_deps (struct deps_desc *, rtx); +extern void remove_from_deps (struct deps_desc *, rtx_insn *); extern void init_insn_reg_pressure_info (rtx); extern dw_t get_dep_weak (ds_t, ds_t); -- cgit v1.1