Skip to content
Commit be99c615 authored by Alexey Bataev's avatar Alexey Bataev
Browse files

[OPENMP50]Codegen for iterator construct.

Implemented codegen for the iterator expression in the depend clauses.
Iterator construct is emitted the following way:
iterator(cnt1, cnt2, ...), in : <dep>

<TotalNumDeps> = <cnt1_size> * <cnt2_size> * ...;
kmp_depend_t deps[<TotalNumDeps>];
deps_counter = 0;
for (cnt1) {
  for (cnt2) {
    ...
    deps[deps_counter].base_addr = &<dep>;
    deps[deps_counter].size = sizeof(<dep>);
    deps[deps_counter].flags = in;
    deps_counter += 1;
    ...
  }
}

For depobj construct the codegen is very similar, but the memory is
allocated dynamically and added extra first item reserved for internal use.
parent e3ba652a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment