This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] vectorizer related issues
On Tue, Dec 16, 2003 at 03:05:16PM +0200, Dorit Naishlos wrote:
> With a lot of effort the vectorizer could deal with pointer arithmetic,
I was playing with the pointer arithmetic in one of the versions of
the scalar evolution analysis. The pointer arithmetic can be handled
by this algorithm, as described by Robert van Engelen in "An Efficient
Algorithm for Pointer-to-Array Access Conversion for Compiling and
Optimizing DSP Applications" http://www.cs.fsu.edu/~engelen/iwia.pdf
> Is anyone planning to fix this situation? i.e., Q1.2: have the front-end
> represent p[i] as an array_ref even when p is declared a pointer, and
This is feasible as a preprocessing pass that promotes pointers to
references.
>
> (4) naming conventions:
> The vectorizer creates many new variables; looking at the tree-dumps,
> having more informative names for variables would be helpful; for example,
> when creating a pointer which is used to point to array b, maybe use p_b as
> a prefix. Q4.1: Are there any naming conventions?
>
Since there is no naming conventions for the moment, I think that they
have to be documented in the function that create the temp vars:
/* Create a new temporary variable declaration of type TYPE. DOES push the
variable into the current binding. Further, assume that this is called
only from gimplification or optimization, at which point the creation of
certain types are bugs. */
tree
create_tmp_var (tree type, const char *prefix)
{
...
}
A grep for create_tmp_var gives the following prefixes:
gimplify.c:713: temp = create_tmp_var (TREE_TYPE (ptr), "retval");
gimplify.c:748: tmp_var = create_tmp_var (ptr_type_node, "saved_stack");
gimplify.c:2066: tmp = create_tmp_var (TREE_TYPE (expr), "iftmp");
gimplify.c:2657: tree flag = create_tmp_var (boolean_type_node, "cleanup");
gimplify.c:3237: tree tmp = create_tmp_var (TREE_TYPE (*expr_p), "vol");
tree-alias-common.c:640: tree temp = create_tmp_var_raw (void_type_node, "aliastmp");
tree-alias-common.c:781: tree fakedecl = create_tmp_var_raw (TREE_VALUE (arg), "normarg");
tree-alias-common.c:806: tree fakedecl = create_tmp_var_raw (void_type_node, "fakearg");
tree-alias-common.c:814: rdecl = create_tmp_var_raw (TREE_TYPE (TREE_TYPE (decl)), "_rv_");
tree-alias-common.c:865: tree fakedecl = create_tmp_var_raw (TREE_VALUE (arg), "ptfarg");
tree-alias-common.c:883: rdecl = create_tmp_var_raw (TREE_TYPE (type), "_rv_");
tree-cfg.c:415: var = create_tmp_var (ptr_type_node, "gotovar");
tree-dfa.c:2476: tag = create_tmp_var_raw (tag_type, "MT");
tree-eh.c:590: new = create_tmp_var (TREE_TYPE (old), "rettmp");
tree-eh.c:785: save_eptr = create_tmp_var (ptr_type_node, "save_eptr");
tree-eh.c:786: save_filt = create_tmp_var (integer_type_node, "save_filt");
tree-eh.c:1092: finally_tmp = create_tmp_var (integer_type_node, "finally_tmp");
tree-sra.c:150: sra_map[var_ix][field_ix] = create_tmp_var (type, "SR");
tree-sra.c:424: tree stmt, tmp = create_tmp_var (TREE_TYPE (rhs), "T");
tree-ssa-pre.c:2999: ei->temp = create_tmp_var (TREE_TYPE (ei->expr), "pretmp");