<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body>
    <div class="moz-cite-prefix">Actually kmp_task_t can have more than
      4 fields. See /*  private vars  */ comment. It is a place for a
      list of private variables used inside of task construct.<br>
      <pre class="moz-signature" cols="72">Best regards,
Alexey Bataev
=============
Software Engineer
Intel Compiler Team</pre>
      13.04.2015 23:43, César пишет:<br>
    </div>
    <blockquote
cite="mid:CAHN8PedpQMkNzuKivKZyFVc40CunW5R=9vdD=tbGgtHXcgMT3A@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hello.
        <div><br>
        </div>
        <div>I'm doing some experiments with the RTL and I'm seeing
          something that I could not understand. When I compile this
          code with clang (clang -S emit-llvm test.c -fopenmp):</div>
        <div><br>
        </div>
        <div>//=--------------------------------------------------=//<br>
        </div>
        <div>
          <div><span class="" style="white-space:pre"> </span>#pragma
            omp parallel<br>
          </div>
          <div><span class="" style="white-space:pre"> </span>{</div>
          <div><span class="" style="white-space:pre"> </span>#pragma
            omp task <span class="" style="white-space:pre"> </span></div>
          <div><span class="" style="white-space:pre"> </span>fun();</div>
          <div><span class="" style="white-space:pre"> </span>}</div>
          <div>//=--------------------------------------------------=//<br>
          </div>
          <div><br>
          </div>
          <div>the LLVM IR produced contains the following call to
            "task_alloc", which, in this case, returns a structure with
            *five* fields:</div>
          <div><br>
          </div>
          <div>//=--------------------------------------------------=//<br>
          </div>
          <div>
            <div>%.task_t.val.addr = call { i8*, i32 (i32, i8*)*, i32,
              i32 (i32, i8*)*, i32 }* @__kmpc_omp_task_alloc({ i32, i32,
              i32, i32, i8* }* %.__kmpc_ident_t.2., i32 %.gtid., i32
              %.flags., i64 ptrtoint ({ i8*, i32 (i32, i8*)*, i32, i32
              (i32, i8*)*, i32 }* getelementptr ({ i8*, i32 (i32, i8*)*,
              i32, i32 (i32, i8*)*, i32 }* null, i32 1) to i64), i64 0,
              i32 (i32, i8*)* @.omp_ptask.)</div>
          </div>
          <div>//=--------------------------------------------------=//<br>
          </div>
          <div><br>
          </div>
          <div>the point is, when I inspect the RTL source code the
            structure kmp_task_t contains only *four* fields:</div>
          <div><br>
          </div>
          <div>//=--------------------------------------------------=//<br>
          </div>
          <div>
            <div>typedef struct kmp_task {                   /* GEH:
              Shouldn't this be aligned somehow? */</div>
            <div>    void *              shareds;            /**<
              pointer to block of pointers to shared vars   */</div>
            <div>    kmp_routine_entry_t routine;            /**<
              pointer to routine to call for executing task */</div>
            <div>    kmp_int32           part_id;            /**<
              part id for the task                          */</div>
            <div>#if OMP_40_ENABLED</div>
            <div>    kmp_routine_entry_t destructors;        /* pointer
              to function to invoke deconstructors of firstprivate C++
              objects */</div>
            <div>#endif // OMP_40_ENABLED</div>
            <div>    /*  private vars  */</div>
            <div>} kmp_task_t;</div>
          </div>
          <div>//=--------------------------------------------------=//</div>
          <div><br>
          </div>
          <div>What am I doing wrong here? Am I using the wrong version
            of some library? To install the RTL and LLVM I followed the
            steps from: <a moz-do-not-send="true"
              href="http://openmp.llvm.org/">http://openmp.llvm.org/</a>
            and <a moz-do-not-send="true"
              href="http://clang-omp.github.io/">http://clang-omp.github.io/</a></div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div><br>
          </div>
          <div>
            <div class="gmail_signature">César.</div>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Openmp-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Openmp-dev@dcs-maillist2.engr.illinois.edu">Openmp-dev@dcs-maillist2.engr.illinois.edu</a>
<a class="moz-txt-link-freetext" href="http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev">http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>