mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-21 04:50:24 +08:00
cfgloop.h (struct loop): Add nb_iterations field.
* cfgloop.h (struct loop): Add nb_iterations field. (current_loops): Declare. * tree-chrec.c (chrec_not_analyzed_yet, chrec_dont_know, chrec_known, count_ev_in_wider_type, chrec_contains_symbols_defined_in_loop): Remove the temporary hooks. * tree-flow-inline.h (loop_containing_stmt): New function. * tree-scalar-evolution.c: Add implementation. * tree-scalar-evolution.h: Add declarations. From-SVN: r84573
This commit is contained in:
parent
98ca843cfb
commit
9baba81be5
@ -1,3 +1,15 @@
|
||||
2004-07-12 Sebastian Pop <pop@cri.ensmp.fr>
|
||||
|
||||
* cfgloop.h (struct loop): Add nb_iterations field.
|
||||
(current_loops): Declare.
|
||||
* tree-chrec.c (chrec_not_analyzed_yet,
|
||||
chrec_dont_know, chrec_known, count_ev_in_wider_type,
|
||||
chrec_contains_symbols_defined_in_loop): Remove the temporary
|
||||
hooks.
|
||||
* tree-flow-inline.h (loop_containing_stmt): New function.
|
||||
* tree-scalar-evolution.c: Add implementation.
|
||||
* tree-scalar-evolution.h: Add declarations.
|
||||
|
||||
2004-07-12 Vladimir Makarov <vmakarov@redhat.com>
|
||||
|
||||
PR rtl-optimization/15921
|
||||
|
@ -176,6 +176,13 @@ struct loop
|
||||
loops nested inside it. */
|
||||
int exit_count;
|
||||
|
||||
/* The probable number of times the loop is executed at runtime.
|
||||
This is an INTEGER_CST or an expression containing symbolic
|
||||
names. Don't access this field directly:
|
||||
number_of_iterations_in_loop computes and caches the computed
|
||||
information in this field. */
|
||||
tree nb_iterations;
|
||||
|
||||
/* Upper bound on number of iterations of a loop. */
|
||||
struct nb_iter_bound *bounds;
|
||||
};
|
||||
@ -227,6 +234,10 @@ struct loops
|
||||
int state;
|
||||
};
|
||||
|
||||
/* The loop tree currently optimized. */
|
||||
|
||||
extern struct loops *current_loops;
|
||||
|
||||
/* Flags for loop discovery. */
|
||||
|
||||
#define LOOP_TREE 1 /* Build loop hierarchy tree. */
|
||||
|
@ -36,47 +36,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#include "tree-chrec.h"
|
||||
#include "tree-pass.h"
|
||||
|
||||
|
||||
/* This part will be removed once the merging is finished. */
|
||||
|
||||
|
||||
|
||||
/* The following trees are unique elements. Thus the comparison of
|
||||
another element to these elements should be done on the pointer to
|
||||
these trees, and not on their value. */
|
||||
|
||||
/* The SSA_NAMEs that are not yet analyzed are qualified with NULL_TREE. */
|
||||
tree chrec_not_analyzed_yet;
|
||||
|
||||
/* Reserved to the cases where the analyzer has detected an
|
||||
undecidable property at compile time. */
|
||||
tree chrec_dont_know;
|
||||
|
||||
/* When the analyzer has detected that a property will never
|
||||
happen, then it qualifies it with chrec_known. */
|
||||
tree chrec_known;
|
||||
|
||||
/* Empty hook. Will be replaced by the main function from
|
||||
tree-scalar-evolution.c. */
|
||||
|
||||
tree
|
||||
count_ev_in_wider_type (tree foo ATTRIBUTE_UNUSED,
|
||||
tree bar ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return NULL_TREE;
|
||||
}
|
||||
|
||||
/* Empty hook. Will be replaced by the main function from
|
||||
tree-scalar-evolution.c. */
|
||||
|
||||
bool
|
||||
chrec_contains_symbols_defined_in_loop (tree chrec ATTRIBUTE_UNUSED,
|
||||
unsigned loop_nb ATTRIBUTE_UNUSED)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Extended folder for chrecs. */
|
||||
|
@ -633,6 +633,18 @@ bsi_stmt_ptr (block_stmt_iterator i)
|
||||
return tsi_stmt_ptr (i.tsi);
|
||||
}
|
||||
|
||||
/* Returns the loop of the statement STMT. */
|
||||
|
||||
static inline struct loop *
|
||||
loop_containing_stmt (tree stmt)
|
||||
{
|
||||
basic_block bb = bb_for_stmt (stmt);
|
||||
if (!bb)
|
||||
return NULL;
|
||||
|
||||
return bb->loop_father;
|
||||
}
|
||||
|
||||
/* Return true if VAR may be aliased. */
|
||||
static inline bool
|
||||
may_be_aliased (tree var)
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -22,7 +22,17 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||||
#ifndef GCC_TREE_SCALAR_EVOLUTION_H
|
||||
#define GCC_TREE_SCALAR_EVOLUTION_H
|
||||
|
||||
extern tree number_of_iterations_in_loop (struct loop *);
|
||||
extern tree get_loop_exit_condition (struct loop *);
|
||||
|
||||
extern void scev_initialize (struct loops *loops);
|
||||
extern void scev_reset (void);
|
||||
extern void scev_finalize (void);
|
||||
extern tree analyze_scalar_evolution (struct loop *, tree);
|
||||
extern tree instantiate_parameters (struct loop *, tree);
|
||||
extern void eliminate_redundant_checks (void);
|
||||
extern void gather_stats_on_scev_database (void);
|
||||
extern void scev_analysis (void);
|
||||
extern bool simple_iv (struct loop *, tree, tree, tree *, tree *);
|
||||
|
||||
#endif /* GCC_TREE_SCALAR_EVOLUTION_H */
|
||||
|
Loading…
x
Reference in New Issue
Block a user