Commit cdbca172 by Jeffrey D. Oldham Committed by Mark Mitchell

Makefile.in (ssa.o): Updated header files in dependences.

	* Makefile.in (ssa.o): Updated header files in dependences.
	* basic-block.h: Added compute_immediate_postdominators declaration.
	* config/i386/i386.h (CONVERT_HARD_REGISTER_TO_SSA_P): Added
	definition.
	* flow.c (compute_immediate_dominators): Updated comment.
	(compute_immediate_postdominators): Added definition.
	* rtl.h (HARD_REGISTER_P): Added definition.
	* ssa.c: Include additional header files.
	(assert): Added definition.
	(ssa_rename_to_lookup): Added to reimplement ssa_rename_to to
	include select hard registers.
	(ssa_rename_to_insert): Likewise.
	(ssa_rename_from_initialize): Likewise.
	(ssa_rename_from_lookup): Likewise.
	(original_register): Likewise.
	(ssa_rename_from_insert): Added to reimplement ssa_rename_from to
	include select hard reigsters.
	(ssa_rename_from_traverse): Likewise.
	(ssa_rename_from_free): Likewise.
	(ssa_rename_from_print): Likewise.
	(ssa_rename_from_print_1): Likewise.
	(ssa_rename_from_hash_function): Likewise.
	(ssa_rename_from_equal): Likewise.
	(ssa_rename_from_delete): Likewise.
	(simplify_to_immediate_dominators): Removed in favor of
	flow.c:compute_immediate_dominators.
	(find_evaluations_1): Modified to work with hard registers.
	(insert_phi_node): Likewise.
	(insert_phi_nodes): Likewise.
	(struct rename_set_data): Updated prev_reg comment.
	(create_delayed_rename): Modified to work with hard registers.
	(RENAME_NO_RTX): Updated comment.
	(apply_delayed_renames): Modified to work with hard registers.
	(rename_insn_1): Likewise and added handling of CLOBBER rtls.
	(rename_block): Updated to use revised ssa_rename_to interface.
	(rename_registers): Updated to use revised ssa_rename_to and
	ssa_rename_from interface.
	(convert_to_ssa): Revised to use compute_immediate_dominators and
	deal with hard registers.
	(make_regs_equivalent_over_bad_edges): Modified to work with hard
	registers.  Added check for illegal unification of hard register.
	(make_equivalent_phi_alternatives_equivalent): Modified to work
	with hard registers.
	(compute_conservative_reg_partition): Likewise.
	(coalesce_if_unconflicting): Modified to work with hard registers
	and check for conflicting hard registers.
	(mark_phi_and_copy_regs): Revised loop to work only on pseudo
	registers.
	(rename_equivalent_regs_in_insn): Modified to work with hard
	registers.
	(record_canonical_element_1): Added definition.
	(check_hard_regs_in_partition): Added definition.
	(convert_from_ssa): Added data structure deallocation and check
	for illegal hard register unification.
	(conflict_hard_regs_p): Added definition.
	* toplev.c (rest_of_compilation): Added comment.

From-SVN: r35384
parent ca47b739
2000-07-30 Jeffrey D. Oldham <oldham@codesourcery.com>
* Makefile.in (ssa.o): Updated header files in dependences.
* basic-block.h: Added compute_immediate_postdominators declaration.
* config/i386/i386.h (CONVERT_HARD_REGISTER_TO_SSA_P): Added
definition.
* flow.c (compute_immediate_dominators): Updated comment.
(compute_immediate_postdominators): Added definition.
* rtl.h (HARD_REGISTER_P): Added definition.
* ssa.c: Include additional header files.
(assert): Added definition.
(ssa_rename_to_lookup): Added to reimplement ssa_rename_to to
include select hard registers.
(ssa_rename_to_insert): Likewise.
(ssa_rename_from_initialize): Likewise.
(ssa_rename_from_lookup): Likewise.
(original_register): Likewise.
(ssa_rename_from_insert): Added to reimplement ssa_rename_from to
include select hard reigsters.
(ssa_rename_from_traverse): Likewise.
(ssa_rename_from_free): Likewise.
(ssa_rename_from_print): Likewise.
(ssa_rename_from_print_1): Likewise.
(ssa_rename_from_hash_function): Likewise.
(ssa_rename_from_equal): Likewise.
(ssa_rename_from_delete): Likewise.
(simplify_to_immediate_dominators): Removed in favor of
flow.c:compute_immediate_dominators.
(find_evaluations_1): Modified to work with hard registers.
(insert_phi_node): Likewise.
(insert_phi_nodes): Likewise.
(struct rename_set_data): Updated prev_reg comment.
(create_delayed_rename): Modified to work with hard registers.
(RENAME_NO_RTX): Updated comment.
(apply_delayed_renames): Modified to work with hard registers.
(rename_insn_1): Likewise and added handling of CLOBBER rtls.
(rename_block): Updated to use revised ssa_rename_to interface.
(rename_registers): Updated to use revised ssa_rename_to and
ssa_rename_from interface.
(convert_to_ssa): Revised to use compute_immediate_dominators and
deal with hard registers.
(make_regs_equivalent_over_bad_edges): Modified to work with hard
registers. Added check for illegal unification of hard register.
(make_equivalent_phi_alternatives_equivalent): Modified to work
with hard registers.
(compute_conservative_reg_partition): Likewise.
(coalesce_if_unconflicting): Modified to work with hard registers
and check for conflicting hard registers.
(mark_phi_and_copy_regs): Revised loop to work only on pseudo
registers.
(rename_equivalent_regs_in_insn): Modified to work with hard
registers.
(record_canonical_element_1): Added definition.
(check_hard_regs_in_partition): Added definition.
(convert_from_ssa): Added data structure deallocation and check
for illegal hard register unification.
(conflict_hard_regs_p): Added definition.
* toplev.c (rest_of_compilation): Added comment.
2000-07-31 Anthony Green <green@redhat.com>
* config/ia64/crtbegin.asm (__EH_FRAME_BEGIN__): Align correctly.
......
......@@ -1328,8 +1328,10 @@ resource.o : resource.c $(CONFIG_H) $(RTL_H) hard-reg-set.h system.h \
$(INSN_ATTR_H) except.h
lcm.o : lcm.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) hard-reg-set.h flags.h \
real.h insn-config.h $(INSN_ATTR_H) $(RECOG_H) $(EXPR_H) $(BASIC_BLOCK_H)
ssa.o : ssa.c $(CONFIG_H) system.h $(RTL_H) $(REGS_H) $(BASIC_BLOCK_H) \
output.h insn-config.h
ssa.o : ssa.c $(CONFIG_H) system.h $(RTL_H) varray.h sbitmap.h \
$(HASHTAB_H) $(REGS_H) hard-reg-set.h flags.h function.h real.h \
insn-config.h $(RECOG_H) $(BASIC_BLOCK_H) \
output.h
conflict.o : conflict.c $(CONFIG_H) system.h $(OBSTACK_H) $(HASHTAB_H) \
$(RTL_H) hard-reg-set.h $(BASIC_BLOCK_H)
profile.o : profile.c $(CONFIG_H) system.h $(RTL_H) $(TREE_H) flags.h \
......
......@@ -420,6 +420,7 @@ int find_edge_index PARAMS ((struct edge_list *,
extern void compute_flow_dominators PARAMS ((sbitmap *, sbitmap *));
extern void compute_immediate_dominators PARAMS ((int *, sbitmap *));
extern void compute_immediate_postdominators PARAMS ((int *, sbitmap *));
enum update_life_extent
......
......@@ -999,6 +999,11 @@ enum reg_class
#define CC_REG_P(X) (REG_P (X) && CC_REGNO_P (REGNO (X)))
#define CC_REGNO_P(X) ((X) == FLAGS_REG || (X) == FPSR_REG)
/* Indicate whether hard register numbered REG_NO should be converted
to SSA form. */
#define CONVERT_HARD_REGISTER_TO_SSA_P(REG_NO) \
(REG_NO == FLAGS_REG || REG_NO == ARG_POINTER_REGNUM)
/* The class value for index registers, and the one for base regs. */
#define INDEX_REG_CLASS INDEX_REGS
......
......@@ -6202,7 +6202,8 @@ compute_flow_dominators (dominators, post_dominators)
free (temp_bitmap);
}
/* Given DOMINATORS, compute the immediate dominators into IDOM. */
/* Given DOMINATORS, compute the immediate dominators into IDOM. If a
block dominates only itself, its entry remains as INVALID_BLOCK. */
void
compute_immediate_dominators (idom, dominators)
......@@ -6242,6 +6243,19 @@ compute_immediate_dominators (idom, dominators)
sbitmap_vector_free (tmp);
}
/* Given POSTDOMINATORS, compute the immediate postdominators into
IDOM. If a block is only dominated by itself, its entry remains as
INVALID_BLOCK. */
void
compute_immediate_postdominators (idom, postdominators)
int *idom;
sbitmap *postdominators;
{
compute_immediate_dominators (idom, postdominators);
return;
}
/* Recompute register set/reference counts immediately prior to register
allocation.
......
......@@ -716,6 +716,12 @@ extern const char * const note_insn_name[NOTE_INSN_MAX - NOTE_INSN_BIAS];
/* 1 in a REG rtx if it corresponds to a variable declared by the user. */
#define REG_USERVAR_P(RTX) ((RTX)->volatil)
/* 1 if the given register REG corresponds to a hard register. */
#define HARD_REGISTER_P(REG) (HARD_REGISTER_NUM_P (REGNO (REG)))
/* 1 if the given register number REG_NO corresponds to a hard register. */
#define HARD_REGISTER_NUM_P(REG_NO) (REG_NO < FIRST_PSEUDO_REGISTER)
/* For a CONST_INT rtx, INTVAL extracts the integer. */
#define INTVAL(RTX) XCWINT(RTX, 0, CONST_INT)
......
......@@ -2978,6 +2978,11 @@ rest_of_compilation (decl)
/* Currently, there's nothing to do in SSA form. */
/* The SSA implementation uses basic block numbers in its phi
nodes. Thus, changing the control-flow graph or the basic
blocks, e.g., calling find_basic_blocks () or cleanup_cfg (),
may cause problems. */
/* Convert from SSA form. */
timevar_push (TV_FROM_SSA);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment