Commit afa1738b by Michael Hayes Committed by Michael Hayes

loop.h (struct loop_mem_info): Move from loop.c (struct loop_info): Add fields store_mems...

	* loop.h (struct loop_mem_info): Move from loop.c
	(struct loop_info): Add fields store_mems, mems, mems_idx,
	mems_allocated, unknown_address_altered,
	unknown_constant_address_altered, num_mem_sets, and
	first_loop_store_insn.

	* loop.c (loop_store_mems): Replace with field in loop_info struct.
	(loop_mems, loop_mems_idx, loop_mems_allocated): Likewise.
	(unknown_address_altered, unknown_constant_address_altered): Likewise.
	(num_mem_sets): Likewise.
 	(replace_loop_mems, replace_loop_regs): New.
	(struct loop_replace_args): New.
	(load_mems): Use replace_loop_mems.
	(try_copy_prop): Use replace_loop_regs.
	(replace_loop_reg, replace_loop_mem): Use loop_replace_args structure.

From-SVN: r36284
parent 8a019bcf
2000-09-11 Michael Hayes <mhayes@cygnus.com>
* loop.h (struct loop_mem_info): Move from loop.c
(struct loop_info): Add fields store_mems, mems, mems_idx,
mems_allocated, unknown_address_altered,
unknown_constant_address_altered, num_mem_sets, and
first_loop_store_insn.
* loop.c (loop_store_mems): Replace with field in loop_info struct.
(loop_mems, loop_mems_idx, loop_mems_allocated): Likewise.
(unknown_address_altered, unknown_constant_address_altered): Likewise.
(num_mem_sets): Likewise.
(replace_loop_mems, replace_loop_regs): New.
(struct loop_replace_args): New.
(load_mems): Use replace_loop_mems.
(try_copy_prop): Use replace_loop_regs.
(replace_loop_reg, replace_loop_mem): Use loop_replace_args structure.
2000-09-09 Stephane Carrez <Stephane.Carrez@worldnet.fr>
* configure.in: Recognize m6811-elf and m6812-elf.
......
......@@ -164,6 +164,15 @@ struct iv_class {
biv controls. */
};
typedef struct loop_mem_info
{
rtx mem; /* The MEM itself. */
rtx reg; /* Corresponding pseudo, if any. */
int optimize; /* Nonzero if we can optimize access to this MEM. */
} loop_mem_info;
/* Information required to calculate the number of loop iterations.
This is set by loop_iterations. */
......@@ -207,6 +216,30 @@ struct loop_info
/* The number of times the loop body was unrolled. */
unsigned int unroll_number;
int used_count_register;
/* List of MEMs that are stored in this loop. */
rtx store_mems;
/* Array of MEMs that are used (read or written) in this loop, but
cannot be aliased by anything in this loop, except perhaps
themselves. In other words, if mems[i] is altered during
the loop, it is altered by an expression that is rtx_equal_p to
it. */
loop_mem_info *mems;
/* The index of the next available slot in MEMS. */
int mems_idx;
/* The number of elements allocated in MEMS. */
int mems_allocated;
/* Nonzero if we don't know what MEMs were changed in the current
loop. This happens if the loop contains a call (in which case
`has_call' will also be set) or if we store into more than
NUM_STORES MEMs. */
int unknown_address_altered;
/* The above doesn't count any readonly memory locations that are
stored. This does. */
int unknown_constant_address_altered;
/* Count of memory write instructions discovered in the loop. */
int num_mem_sets;
/* The insn where the first of these was found. */
rtx first_loop_store_insn;
};
/* Definitions used by the basic induction variable discovery code. */
......
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