<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <p><br>
    </p>
    <div class="moz-cite-prefix">On 01/19/2017 03:36 PM, Mehdi Amini via
      llvm-dev wrote:<br>
    </div>
    <blockquote
      cite="mid:C0434DA1-5426-42DD-BF1C-6FC705BB23A9@apple.com"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <br class="">
      <div>
        <blockquote type="cite" class="">
          <div class="">On Jan 19, 2017, at 1:32 PM, Daniel Berlin <<a
              moz-do-not-send="true" href="mailto:dberlin@dberlin.org"
              class="">dberlin@dberlin.org</a>> wrote:</div>
          <br class="Apple-interchange-newline">
          <div class=""><br class="Apple-interchange-newline">
            <br style="font-family: Helvetica; font-size: 12px;
              font-style: normal; font-variant-caps: normal;
              font-weight: normal; letter-spacing: normal; orphans:
              auto; text-align: start; text-indent: 0px; text-transform:
              none; white-space: normal; widows: auto; word-spacing:
              0px; -webkit-text-stroke-width: 0px;" class="">
            <div class="gmail_quote" style="font-family: Helvetica;
              font-size: 12px; font-style: normal; font-variant-caps:
              normal; font-weight: normal; letter-spacing: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;">On
              Thu, Jan 19, 2017 at 1:12 PM, Mehdi Amini<span
                class="Apple-converted-space"> </span><span dir="ltr"
                class=""><<a moz-do-not-send="true"
                  href="mailto:mehdi.amini@apple.com" target="_blank"
                  class="">mehdi.amini@apple.com</a>></span><span
                class="Apple-converted-space"> </span>wrote:<br class="">
              <blockquote class="gmail_quote" style="margin: 0px 0px 0px
                0.8ex; border-left-width: 1px; border-left-color:
                rgb(204, 204, 204); border-left-style: solid;
                padding-left: 1ex;">
                <div style="word-wrap: break-word;" class="">
                  <div class="">
                    <div class="h5"><br class="">
                      <div class="">
                        <blockquote type="cite" class="">
                          <div class="">On Jan 19, 2017, at 12:04 PM,
                            Daniel Berlin <<a moz-do-not-send="true"
                              href="mailto:dberlin@dberlin.org"
                              target="_blank" class="">dberlin@dberlin.org</a>>
                            wrote:</div>
                          <br
                            class="m_2511294743644490236Apple-interchange-newline">
                          <div class=""><br
                              class="m_2511294743644490236Apple-interchange-newline">
                            <br style="font-family: Helvetica;
                              font-size: 12px; font-style: normal;
                              font-variant-caps: normal; font-weight:
                              normal; letter-spacing: normal;
                              text-align: start; text-indent: 0px;
                              text-transform: none; white-space: normal;
                              word-spacing: 0px;" class="">
                            <div class="gmail_quote" style="font-family:
                              Helvetica; font-size: 12px; font-style:
                              normal; font-variant-caps: normal;
                              font-weight: normal; letter-spacing:
                              normal; text-align: start; text-indent:
                              0px; text-transform: none; white-space:
                              normal; word-spacing: 0px;">On Thu, Jan
                              19, 2017 at 11:46 AM, Mehdi Amini via
                              llvm-dev<span
                                class="m_2511294743644490236Apple-converted-space"> </span><span
                                dir="ltr" class=""><<a
                                  moz-do-not-send="true"
                                  href="mailto:llvm-dev@lists.llvm.org"
                                  target="_blank" class="">llvm-dev@lists.llvm.<wbr
                                    class="">org</a>></span><span
                                class="m_2511294743644490236Apple-converted-space"> </span>wrote:<br
                                class="">
                              <blockquote class="gmail_quote"
                                style="margin: 0px 0px 0px 0.8ex;
                                border-left-width: 1px;
                                border-left-color: rgb(204, 204, 204);
                                border-left-style: solid; padding-left:
                                1ex;"><span class=""><br class="">
                                  > On Jan 19, 2017, at 11:36 AM,
                                  Adve, Vikram Sadanand via llvm-dev
                                  <<a moz-do-not-send="true"
                                    href="mailto:llvm-dev@lists.llvm.org"
                                    target="_blank" class="">llvm-dev@lists.llvm.org</a>>
                                  wrote:<br class="">
                                  ><br class="">
                                  > Hi Johannes,<br class="">
                                  ><br class="">
                                  >> I am especially curious where
                                  you get your data from. Tapir [0] (and
                                  to<br class="">
                                  >> some degree PIR [1]) have
                                  shown that, counterintuitively, only a
                                  few changes<br class="">
                                  >> to LLVM passes are needed.
                                  Tapir was recently used in an MIT
                                  class with a<br class="">
                                  >> lot of students and it seemed
                                  to work well with only minimal changes<br
                                    class="">
                                  >> to analysis and especially
                                  transformation passes.<br class="">
                                  ><br class="">
                                  > TAPIR is an elegant, small
                                  extension and, in particular, I think
                                  the idea of asymmetric parallel tasks
                                  and control flow is a clever way to
                                  express parallelism with serial
                                  semantics, as in Cilk.  Encoding the
                                  control flow extensions as explicit
                                  instructions is orthogonal to that,
                                  though arguably more elegant than
                                  using region tags + metadata.<br
                                    class="">
                                  ><br class="">
                                  > However, Cilk is a tiny language
                                  compared with the full complexity of
                                  other languages, like OpenMP.  To take
                                  just one example, TAPIR cannot express
                                  the ORDERED construct of OpenMP.  A
                                  more serious concern, IMO, is that
                                  TAPIR (like Cilk) requires serial
                                  semantics, whereas there are many
                                  parallel languages, OpenMP included,
                                  that do not obey that restriction. 
                                  Third, OpenMP has *numerous* clauses,
                                  e.g., REDUCTION or PRIVATE,  that are
                                  needed because without that, you’d be
                                  dependent on fundamentally hard
                                  compiler analyses to extract the same
                                  information for satisfactory parallel
                                  performance; realistic applications
                                  cannot depend on the success of such
                                  analyses.<br class="">
                                  <br class="">
                                </span>I agree with this, but I’m also
                                wondering if it needs to be first class
                                in the IR?<br class="">
                                For example we know our alias analysis
                                is very basic, and C/C++ have a higher
                                constraint thanks to their type system,
                                but we didn’t inject this higher level
                                information that helps the optimizer as
                                first class IR constructs.<br class="">
                              </blockquote>
                              <div class=""><br class="">
                              </div>
                              <div class="">FWIW, while i agree with the
                                general point, i wouldn't use this
                                example.</div>
                              <div class="">Because we pretty much still
                                suffer to this day because of it (both
                                in AA, and devirt, and ...)  :)</div>
                              <div class="">We can't always even tell
                                fields apart</div>
                            </div>
                          </div>
                        </blockquote>
                        <br class="">
                      </div>
                    </div>
                  </div>
                  <div class="">Is it inherent to the infrastructure,
                    i.e. using metadata instead of first class IR
                    construct or is it just a “quality of
                    implementation” issue?</div>
                  <div class=""><br class="">
                  </div>
                </div>
              </blockquote>
              <div class=""><br class="">
              </div>
              <div class="">Not to derail this conversation:<br class="">
                <br class="">
              </div>
              <div class="">IMHO, At some point there is no real
                difference :)</div>
              <div class=""><br class="">
              </div>
              <div class="">Because otherwise, everything is a QOI
                issue.</div>
              <div class=""><br class="">
              </div>
              <div class="">IE if it's super tricky to get metadata that
                works well and works right, doesn't get lost, etc, and
                that's inherent to using metadata, that to me is not a
                QOI issue.</div>
              <div class=""><br class="">
              </div>
              <div class="">So could it be done with metadata? Probably?</div>
              <div class="">But at the same time,  if it had been done
                with more first class constructs, it would have happened
                years ago  and been much lower cost.</div>
            </div>
          </div>
        </blockquote>
        <br class="">
      </div>
      <div>This is what I meant by “inherent to the infrastructure”,
        thanks for clarifying.</div>
    </blockquote>
    <br>
    To clarify, we were proposing metadata that is used as arguments to
    the region-annotation intrinsics. This metadata has the nice
    property that it does not get dropped (so it is just being used as a
    way of encoding whatever data structures are necessary without
    predefining a syntactic schema).<br>
    <br>
     -Hal<br>
    <br>
    <blockquote
      cite="mid:C0434DA1-5426-42DD-BF1C-6FC705BB23A9@apple.com"
      type="cite">
      <div><br class="">
      </div>
      <div>— </div>
      <div>Mehdi</div>
      <div><br class="">
      </div>
      <br class="">
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
LLVM Developers mailing list
<a class="moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </body>
</html>