aboutsummaryrefslogtreecommitdiff
path: root/gcc/basic-block.h
diff options
context:
space:
mode:
authorAlex Samuel <samuel@gcc.gnu.org>2000-04-06 21:22:49 +0000
committerAlex Samuel <samuel@gcc.gnu.org>2000-04-06 21:22:49 +0000
commit4e872036e8a62e1b7c3dbfa54cc7584fd61831b2 (patch)
tree03b76aa3f87cb424bd3389a8c22d97e1312c57ac /gcc/basic-block.h
parent2c561874133f1756d49d993d7561a802bd8448eb (diff)
downloadgcc-4e872036e8a62e1b7c3dbfa54cc7584fd61831b2.zip
gcc-4e872036e8a62e1b7c3dbfa54cc7584fd61831b2.tar.gz
gcc-4e872036e8a62e1b7c3dbfa54cc7584fd61831b2.tar.bz2
rtl.h (INSN_P): New macro.
* rtl.h (INSN_P): New macro. (successor_phi_fn): New typedef. (for_each_successor_phi): New prototype. (in_ssa_form): New variable. (PHI_NODE_P): Likewise. * flow.c (calculate_global_regs_live): Add to new_live_at_end from phi nodes in successors. (mark_used_regs): Add PHI case. (set_phi_alternative_reg): New function. (life_analysis): Assert that dead code elimination is not selected when in SSA form. * toplev.c (to_ssa_time): New variable. (from_ssa_time): Likewise. (compile_file): Zero to_ssa_time and from_ssa_time. Print time to convert to and from SSA. (rest_of_compilation): Time convert_to_ssa and convert_from_ssa. (print_time): Compute percent fraction as integer. * ssa.c (PHI_NODE_P): Moved to rtl.h. (convert_to_ssa): Check if we're already in SSA. Don't eliminate dead code in life_analysis. Rerun flow and life analysis at bottom. (eliminate_phi): Use canonical regnos when adding nodes. (mark_reg_in_phi): New function. (mark_phi_and_copy_regs): Likewise. (convert_from_ssa): Rerun life analysis at top. Use coalesced partition. Check for removing a phi node at the end of the block. (compute_coalesced_reg_partition): New function. (coalesce_regs_in_copies): Likewise. (coalesce_reg_in_phi): Likewise. (coalesce_regs_in_sucessor_phi_nodes): Likewise. (for_each_successor_phi): Likewise. (rename_context): New struct. (rename_block): Use a rename_context with rename_insn_1. When renaming sets of a subreg, emit a copy of the entire reg first. (rename_insn_1): Treat data as a rename_context *. Save current insn in set_data. (rename_set_data): Add field set_insn. * Makefile.in (HASHTAB_H): Move up in file. (OBSTACK_H): New macro. (collect2.o): Use OBSTACK_H in dependencies. (sdbout.o): Likewise. (emit-rtl.o): Likewise. (simplify-rtx.o): Likewise. (fix-header.o): Likewise. (OBJS): Add conflict.o. (conflict.o): New rule. * basic-block.h: Include partition.h. (conflict_graph): New typedef. (conflict_graph_enum_fn): Likewise. (conflict_graph_new): New prototype. (conflict_graph_delete): Likewise. (conflict_graph_add): Likewise. (conflict_graph_conflict_p): Likewise. (conflict_graph_enum): Likewise. (conflict_graph_merge_regs): Likewise. (conflict_graph_print): Likewise. (conflict_graph_compute): Likewise. * conflict.c: New file. From-SVN: r32979
Diffstat (limited to 'gcc/basic-block.h')
-rw-r--r--gcc/basic-block.h31
1 files changed, 30 insertions, 1 deletions
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index c3a9d9a..5fa6226 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA. */
#include "bitmap.h"
#include "sbitmap.h"
#include "varray.h"
+#include "partition.h"
/* Head of register set linked list. */
typedef bitmap_head regset_head;
@@ -146,7 +147,9 @@ typedef struct basic_block_def {
/* The edges into and out of the block. */
edge pred, succ;
- /* Liveness info. */
+ /* Liveness info. Note that in SSA form, global_live_at_start does
+ not reflect the use of regs in phi functions, since the liveness
+ of these regs may depend on which edge was taken into the block. */
regset local_set;
regset global_live_at_start;
regset global_live_at_end;
@@ -459,5 +462,31 @@ extern void debug_regset PARAMS ((regset));
extern void verify_flow_info PARAMS ((void));
extern int flow_loop_outside_edge_p PARAMS ((const struct loop *, edge));
+typedef struct conflict_graph_def *conflict_graph;
+
+/* Callback function when enumerating conflicts. The arguments are
+ the smaller and larger regno in the conflict. Returns zero if
+ enumeration is to continue, non-zero to halt enumeration. */
+typedef int (*conflict_graph_enum_fn) (int, int, void *);
+
+
+/* Prototypes of operations on conflict graphs. */
+
+extern conflict_graph conflict_graph_new
+ PARAMS ((int));
+extern void conflict_graph_delete PARAMS ((conflict_graph));
+extern int conflict_graph_add PARAMS ((conflict_graph,
+ int, int));
+extern int conflict_graph_conflict_p PARAMS ((conflict_graph,
+ int, int));
+extern void conflict_graph_enum PARAMS ((conflict_graph, int,
+ conflict_graph_enum_fn,
+ void *));
+extern void conflict_graph_merge_regs PARAMS ((conflict_graph, int,
+ int));
+extern void conflict_graph_print PARAMS ((conflict_graph, FILE*));
+extern conflict_graph conflict_graph_compute
+ PARAMS ((regset,
+ partition));
#endif /* _BASIC_BLOCK_H */