This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [GSoC] generation of Gimple code from isl_ast_node_user

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:


for (int c1 = 0; c1 <= 49; c1 += 1)

for (int c1 = 0; c1 <= -n.0 + 69; c1 += 1)

for (int c1 = 0; c1 < n.0; c1 += 1)

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

OK. The tests look good.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]