Commit 502ef838 by Paolo Bonzini Committed by Paolo Bonzini

df.h (enum df_ref_class): Remove DF_REF_EXTRACT.

2010-09-04  Paolo Bonzini  <bonzini@gnu.org>

	* df.h (enum df_ref_class): Remove DF_REF_EXTRACT.
	(struct df_extract_ref): Remove.
	(union df_ref_d): Remove extract_ref member.
	(df_ref_create): Remove last three arguments.
	(DF_REF_LOC): Remove DF_REF_EXTRACT case.
	* df-scan.c (df_ref_record): Remove last three arguments, do not
	pass them to df_ref_create_structure.
	(df_uses_record): Remove first and last three arguments.  Replace
	first argument with DF_REF_REGULAR, adjust calls to remove the
	width, offset and mode.  Always call recursively on the second
	and third argument of ZERO_EXTRACT and SIGN_EXTRACT.
	(df_ref_create_structure): Remove first argument.
	(struct df_scan_problem_data): Remove ref_extract_pool.
	(df_scan_free_internal): Do not free it.
	(df_scan_alloc): Do not allocate it.
	(df_ref_create): Remove last three arguments, do not pass them to
	df_ref_create_structure.
	(df_free_ref): Remove DF_REF_EXTRACT case.
	(df_notes_rescan): Adjust call to df_uses_record.
	(df_ref_equal_p, df_ref_compare, df_ref_create_structure):
	Remove DF_REF_EXTRACT case.
	(df_def_record_1): Do not special case class for a ZERO_EXTRACT lhs.
	Adjust calls to df_ref_record, using DF_REF_REGULAR for all REG
	and SUBREG definitions.
	(df_get_conditional_uses): Remove references to width/offset/mode,
	adjust call to df_ref_create_structure.
	(df_get_call_refs, df_insn_refs_collect, df_bb_refs_collect,
	df_entry_block_defs_collect, df_exit_block_uses_collect): Adjust
	calls to df_uses_record and df_ref_record.
	* fwprop.c (update_df): Remove references to width/offset/mode,
	adjust call to df_ref_create.

From-SVN: r163854
parent f37b4faa
2010-09-04 Paolo Bonzini <bonzini@gnu.org>
* df.h (enum df_ref_class): Remove DF_REF_EXTRACT.
(struct df_extract_ref): Remove.
(union df_ref_d): Remove extract_ref member.
(df_ref_create): Remove last three arguments.
(DF_REF_LOC): Remove DF_REF_EXTRACT case.
* df-scan.c (df_ref_record): Remove last three arguments, do not
pass them to df_ref_create_structure.
(df_uses_record): Remove first and last three arguments. Replace
first argument with DF_REF_REGULAR, adjust calls to remove the
width, offset and mode. Always call recursively on the second
and third argument of ZERO_EXTRACT and SIGN_EXTRACT.
(df_ref_create_structure): Remove first argument.
(struct df_scan_problem_data): Remove ref_extract_pool.
(df_scan_free_internal): Do not free it.
(df_scan_alloc): Do not allocate it.
(df_ref_create): Remove last three arguments, do not pass them to
df_ref_create_structure.
(df_free_ref): Remove DF_REF_EXTRACT case.
(df_notes_rescan): Adjust call to df_uses_record.
(df_ref_equal_p, df_ref_compare, df_ref_create_structure):
Remove DF_REF_EXTRACT case.
(df_def_record_1): Do not special case class for a ZERO_EXTRACT lhs.
Adjust calls to df_ref_record, using DF_REF_REGULAR for all REG
and SUBREG definitions.
(df_get_conditional_uses): Remove references to width/offset/mode,
adjust call to df_ref_create_structure.
(df_get_call_refs, df_insn_refs_collect, df_bb_refs_collect,
df_entry_block_defs_collect, df_exit_block_uses_collect): Adjust
calls to df_uses_record and df_ref_record.
* fwprop.c (update_df): Remove references to width/offset/mode,
adjust call to df_ref_create.
2010-09-03 Jan Hubicka <jh@suse.cz>
* ipa.c (build_cdtor): Take VECtor as argument; fix array walk.
......
......@@ -67,7 +67,7 @@ enum df_flow_dir
};
/* Descriminator for the various df_ref types. */
enum df_ref_class {DF_REF_BASE, DF_REF_ARTIFICIAL, DF_REF_REGULAR, DF_REF_EXTRACT};
enum df_ref_class {DF_REF_BASE, DF_REF_ARTIFICIAL, DF_REF_REGULAR};
/* The first of these us a set of a registers. The remaining three
are all uses of a register (the mem_load and mem_store relate to
......@@ -402,26 +402,12 @@ struct df_regular_ref
rtx *loc;
};
/* A df_ref_extract is just a df_ref with a width and offset field at
the end of it. It is used to hold this information if the ref was
wrapped by a SIGN_EXTRACT or a ZERO_EXTRACT and to pass this info
to passes that wish to process partial regs precisely. */
struct df_extract_ref
{
struct df_regular_ref base;
int width;
int offset;
enum machine_mode mode;
};
/* Union of the different kinds of defs/uses placeholders. */
union df_ref_d
{
struct df_base_ref base;
struct df_regular_ref regular_ref;
struct df_artificial_ref artificial_ref;
struct df_extract_ref extract_ref;
};
typedef union df_ref_d *df_ref;
......@@ -645,7 +631,7 @@ struct df_d
#define DF_REF_REAL_LOC(REF) (GET_CODE (*((REF)->regular_ref.loc)) == SUBREG \
? &SUBREG_REG (*((REF)->regular_ref.loc)) : ((REF)->regular_ref.loc))
#define DF_REF_REG(REF) ((REF)->base.reg)
#define DF_REF_LOC(REF) ((DF_REF_CLASS(REF) == DF_REF_REGULAR || DF_REF_CLASS(REF) == DF_REF_EXTRACT) ? \
#define DF_REF_LOC(REF) (DF_REF_CLASS(REF) == DF_REF_REGULAR ? \
(REF)->regular_ref.loc : NULL)
#define DF_REF_BB(REF) (DF_REF_IS_ARTIFICIAL(REF) ? \
(REF)->artificial_ref.bb : BLOCK_FOR_INSN (DF_REF_INSN(REF)))
......@@ -994,8 +980,7 @@ extern void df_grow_reg_info (void);
extern void df_grow_insn_info (void);
extern void df_scan_blocks (void);
extern df_ref df_ref_create (rtx, rtx *, rtx,basic_block,
enum df_ref_type, int ref_flags,
int, int, enum machine_mode);
enum df_ref_type, int ref_flags);
extern void df_ref_remove (df_ref);
extern struct df_insn_info * df_insn_create_insn_record (rtx);
extern void df_insn_delete (basic_block, unsigned int);
......
......@@ -908,28 +908,17 @@ update_df (rtx insn, rtx *loc, df_ref *use_rec, enum df_ref_type type,
{
df_ref use = *use_rec;
df_ref orig_use = use, new_use;
int width = -1;
int offset = -1;
enum machine_mode mode = VOIDmode;
rtx *new_loc = find_occurrence (loc, DF_REF_REG (orig_use));
use_rec++;
if (!new_loc)
continue;
if (DF_REF_FLAGS_IS_SET (orig_use, DF_REF_SIGN_EXTRACT | DF_REF_ZERO_EXTRACT))
{
width = DF_REF_EXTRACT_WIDTH (orig_use);
offset = DF_REF_EXTRACT_OFFSET (orig_use);
mode = DF_REF_EXTRACT_MODE (orig_use);
}
/* Add a new insn use. Use the original type, because it says if the
use was within a MEM. */
new_use = df_ref_create (DF_REF_REG (orig_use), new_loc,
insn, BLOCK_FOR_INSN (insn),
type, DF_REF_FLAGS (orig_use) | new_flags,
width, offset, mode);
type, DF_REF_FLAGS (orig_use) | new_flags);
/* Set up the use-def chain. */
gcc_assert (DF_REF_ID (new_use) == (int) VEC_length (df_ref, use_def_ref));
......
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