summaryrefslogtreecommitdiff
path: root/gcc/loop.h
diff options
context:
space:
mode:
authorm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-09 23:02:15 +0000
committerm.hayes <m.hayes@138bc75d-0d04-0410-961f-82ee72b054a4>2000-09-09 23:02:15 +0000
commit2ff1269a5f3b7ac0bbe56c80f37702b3b5442192 (patch)
treed8fbd83f8b201ad6fc4771e3ecc10960af06c915 /gcc/loop.h
parent1c85663dd4e524585ebabc3cb036ec19c06cfad8 (diff)
downloadgcc-2ff1269a5f3b7ac0bbe56c80f37702b3b5442192.tar.gz
* 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@36284 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/loop.h')
-rw-r--r--gcc/loop.h33
1 files changed, 33 insertions, 0 deletions
diff --git a/gcc/loop.h b/gcc/loop.h
index 1bc9a35ae63..78939a1d1b9 100644
--- a/gcc/loop.h
+++ b/gcc/loop.h
@@ -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. */