This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [GSoC] generation of Gimple code from isl_ast_node_user
- From: Tobias Grosser <tobias at grosser dot es>
- To: Roman Gareev <gareevroman at gmail dot com>
- Cc: Mircea Namolaru <mircea dot namolaru at inria dot fr>, gcc-patches at gcc dot gnu dot org
- Date: Thu, 17 Jul 2014 16:26:14 +0200
- Subject: Re: [GSoC] generation of Gimple code from isl_ast_node_user
- Authentication-results: sourceware.org; auth=none
- References: <CABGF_gfHjdyYUxAsa4dpSZ4O6sHb23Tte_nKZtYwE3KktY2Sww at mail dot gmail dot com> <53C27B10 dot 6050703 at grosser dot es> <CABGF_gfU1dPC029cwZNGC67D_BHR1Of9XULgp_AWkOBWoitMsg at mail dot gmail dot com> <53C55264 dot 7070404 at grosser dot es> <CABGF_gfGh+XAM+0qnsZ=GXp2e8NYQuGfTHuSj2wXORnA9cSz+Q at mail dot gmail dot com>
On 17/07/2014 16:08, Roman Gareev wrote:
I see. Could you use vec_safe_grow_cleared(iv_map, loop_num) instead?
>This shows probably better that you zero initialize the vector.
If I am not mistaken, vec_safe_grow_cleared has the following declaration:
vec_safe_grow_cleared (vec<T, A, vl_embed> *&v, unsigned len CXX_MEM_STAT_INFO)
Should we rewrite all the functions, which interact with iv_map?
Can you explain why all functions would need to be rewritten? I proposed
this function as an easier way to NULL initialize the vector and did not
expect any rewrite to be necessary.
If there is no such thing, please just add a comment that your loop NULL
initializes the vector. We can later improve this.
I've added test cases, which produce the following ISL code:
isl-ast-gen-single-loop-1.c
for (int c1 = 0; c1 <= 49; c1 += 1)
S_3(c1);
isl-ast-gen-single-loop-2.c
for (int c1 = 0; c1 <= -n.0 + 69; c1 += 1)
S_5(c1);
isl-ast-gen-single-loop-3.c
for (int c1 = 0; c1 < n.0; c1 += 1)
S_5(c1);
The second and the third one use arrays. I wanted to make them similar
to the first one, but inability to handle blocks prevented this. For
example,
OK. The tests look good.
Cheers,
Tobias