diff options
author | Nathan Froyd <froydnj@codesourcery.com> | 2010-04-26 18:21:17 +0000 |
---|---|---|
committer | Nathan Froyd <froydnj@gcc.gnu.org> | 2010-04-26 18:21:17 +0000 |
commit | 448f65dba370077858a46c17c869c33a12f158a4 (patch) | |
tree | b29bb045ba52e3ce9f6781d3569951a8bdc1e19b /gcc | |
parent | a1cbd45d53cf329cef12c2adccba5001a9d399c9 (diff) | |
download | gcc-448f65dba370077858a46c17c869c33a12f158a4.zip gcc-448f65dba370077858a46c17c869c33a12f158a4.tar.gz gcc-448f65dba370077858a46c17c869c33a12f158a4.tar.bz2 |
cfgloop.h (struct loop): Move can_be_parallel field up.
* cfgloop.h (struct loop): Move can_be_parallel field up.
* ipa-prop.h (struct ip_node_params): Move bitfields up.
* tree-ssa-loop-ivopts.c (struct version_info): Move inv_id field
down.
(struct iv_cand): Convert pos field into a bitfield.
* tree-vectorizer.h (struct _loop_vec_info): Move loop_line_number
field up.
(struct _stmt_vec_info): Shuffle fields for better packing.
From-SVN: r158743
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 11 | ||||
-rw-r--r-- | gcc/cfgloop.h | 6 | ||||
-rw-r--r-- | gcc/ipa-prop.h | 19 | ||||
-rw-r--r-- | gcc/tree-ssa-loop-ivopts.c | 4 | ||||
-rw-r--r-- | gcc/tree-vectorizer.h | 49 |
5 files changed, 50 insertions, 39 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4e960b6..2ceefa2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,14 @@ +2010-04-26 Nathan Froyd <froydnj@codesourcery.com> + + * cfgloop.h (struct loop): Move can_be_parallel field up. + * ipa-prop.h (struct ip_node_params): Move bitfields up. + * tree-ssa-loop-ivopts.c (struct version_info): Move inv_id field + down. + (struct iv_cand): Convert pos field into a bitfield. + * tree-vectorizer.h (struct _loop_vec_info): Move loop_line_number + field up. + (struct _stmt_vec_info): Shuffle fields for better packing. + 2010-04-26 Eric Botcazou <ebotcazou@adacore.com> * varasm.c (IN_NAMED_SECTION): Remove guard. diff --git a/gcc/cfgloop.h b/gcc/cfgloop.h index 26f9050..4135ed7 100644 --- a/gcc/cfgloop.h +++ b/gcc/cfgloop.h @@ -148,6 +148,9 @@ struct GTY ((chain_next ("%h.next"))) loop { bool any_upper_bound; bool any_estimate; + /* True if the loop can be parallel. */ + bool can_be_parallel; + /* An integer estimation of the number of iterations. Estimate_state describes what is the state of the estimation. */ enum loop_estimation estimate_state; @@ -158,9 +161,6 @@ struct GTY ((chain_next ("%h.next"))) loop { /* Head of the cyclic list of the exits of the loop. */ struct loop_exit *exits; - /* True if the loop can be parallel. */ - bool can_be_parallel; - /* The single induction variable of the loop when the loop is in normal form. */ tree single_iv; diff --git a/gcc/ipa-prop.h b/gcc/ipa-prop.h index 4cb24698..1df3abd 100644 --- a/gcc/ipa-prop.h +++ b/gcc/ipa-prop.h @@ -181,6 +181,15 @@ struct ipa_node_params this function's parameters would not be analyzed by the different stages of IPA CP. */ int param_count; + /* Whether this function is called with variable number of actual + arguments. */ + unsigned called_with_var_arguments : 1; + /* Whether the modification analysis has already been performed. */ + unsigned modification_analysis_done : 1; + /* Whether the param uses analysis has already been performed. */ + unsigned uses_analysis_done : 1; + /* Whether the function is enqueued in an ipa_func_list. */ + unsigned node_enqueued : 1; /* Pointer to an array of structures describing individual formal parameters. */ struct ipa_param_descriptor *params; @@ -195,16 +204,6 @@ struct ipa_node_params the profiling information of the original function and the versioned one. */ gcov_type count_scale; - - /* Whether this function is called with variable number of actual - arguments. */ - unsigned called_with_var_arguments : 1; - /* Whether the modification analysis has already been performed. */ - unsigned modification_analysis_done : 1; - /* Whether the param uses analysis has already been performed. */ - unsigned uses_analysis_done : 1; - /* Whether the function is enqueued in an ipa_func_list. */ - unsigned node_enqueued : 1; }; /* ipa_node_params access functions. Please use these to access fields that diff --git a/gcc/tree-ssa-loop-ivopts.c b/gcc/tree-ssa-loop-ivopts.c index a7a9e25..a64950e 100644 --- a/gcc/tree-ssa-loop-ivopts.c +++ b/gcc/tree-ssa-loop-ivopts.c @@ -120,8 +120,8 @@ struct version_info struct iv *iv; /* Induction variable description. */ bool has_nonlin_use; /* For a loop-level invariant, whether it is used in an expression that is not an induction variable. */ - unsigned inv_id; /* Id of an invariant. */ bool preserve_biv; /* For the original biv, whether to preserve it. */ + unsigned inv_id; /* Id of an invariant. */ }; /* Types of uses. */ @@ -192,7 +192,7 @@ struct iv_cand unsigned id; /* The number of the candidate. */ bool important; /* Whether this is an "important" candidate, i.e. such that it should be considered by all uses. */ - enum iv_position pos; /* Where it is computed. */ + ENUM_BITFIELD(iv_position) pos : 8; /* Where it is computed. */ gimple incremented_at;/* For original biv, the statement where it is incremented. */ tree var_before; /* The variable used for it before increment. */ diff --git a/gcc/tree-vectorizer.h b/gcc/tree-vectorizer.h index c80c345..fc9f0e9 100644 --- a/gcc/tree-vectorizer.h +++ b/gcc/tree-vectorizer.h @@ -198,6 +198,9 @@ typedef struct _loop_vec_info { /* Unrolling factor */ int vectorization_factor; + /* The loop location in the source. */ + LOC loop_line_number; + /* Unknown DRs according to which loop was peeled. */ struct data_reference *unaligned_dr; @@ -228,9 +231,6 @@ typedef struct _loop_vec_info { runtime (loop versioning) misalignment check. */ VEC(gimple,heap) *may_misalign_stmts; - /* The loop location in the source. */ - LOC loop_line_number; - /* All interleaving chains of stores in the loop, represented by the first stmt in the chain. */ VEC(gimple, heap) *strided_stores; @@ -398,21 +398,23 @@ typedef struct _stmt_vec_info { enum stmt_vec_info_type type; + /* Indicates whether this stmts is part of a computation whose result is + used outside the loop. */ + bool live; + + /* Stmt is part of some pattern (computation idiom) */ + bool in_pattern_p; + + /* For loads only, if there is a store with the same location, this field is + TRUE. */ + bool read_write_dep; + /* The stmt to which this info struct refers to. */ gimple stmt; /* The loop_vec_info with respect to which STMT is vectorized. */ loop_vec_info loop_vinfo; - /* Not all stmts in the loop need to be vectorized. e.g, the increment - of the loop induction variable and computation of array indexes. relevant - indicates whether the stmt needs to be vectorized. */ - enum vect_relevant relevant; - - /* Indicates whether this stmts is part of a computation whose result is - used outside the loop. */ - bool live; - /* The vector type to be used for the LHS of this statement. */ tree vectype; @@ -436,9 +438,6 @@ typedef struct _stmt_vec_info { tree dr_step; tree dr_aligned_to; - /* Stmt is part of some pattern (computation idiom) */ - bool in_pattern_p; - /* Used for various bookkeeping purposes, generally holding a pointer to some other stmt S that is in some way "related" to this stmt. Current use of this field is: @@ -457,11 +456,17 @@ typedef struct _stmt_vec_info { /* Classify the def of this stmt. */ enum vect_def_type def_type; + /* Whether the stmt is SLPed, loop-based vectorized, or both. */ + enum slp_vect_type slp_type; + /* Interleaving info. */ /* First data-ref in the interleaving group. */ gimple first_dr; /* Pointer to the next data-ref in the group. */ gimple next_dr; + /* In case that two or more stmts share data-ref, this is the pointer to the + previously detected stmt with the same dr. */ + gimple same_dr_stmt; /* The size of the interleaving group. */ unsigned int size; /* For stores, number of stores from this group seen. We vectorize the last @@ -470,12 +475,11 @@ typedef struct _stmt_vec_info { /* For loads only, the gap from the previous load. For consecutive loads, GAP is 1. */ unsigned int gap; - /* In case that two or more stmts share data-ref, this is the pointer to the - previously detected stmt with the same dr. */ - gimple same_dr_stmt; - /* For loads only, if there is a store with the same location, this field is - TRUE. */ - bool read_write_dep; + + /* Not all stmts in the loop need to be vectorized. e.g, the increment + of the loop induction variable and computation of array indexes. relevant + indicates whether the stmt needs to be vectorized. */ + enum vect_relevant relevant; /* Vectorization costs associated with statement. */ struct @@ -484,9 +488,6 @@ typedef struct _stmt_vec_info { int inside_of_loop; /* Statements generated inside loop. */ } cost; - /* Whether the stmt is SLPed, loop-based vectorized, or both. */ - enum slp_vect_type slp_type; - /* The bb_vec_info with respect to which STMT is vectorized. */ bb_vec_info bb_vinfo; |