<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 03/16/2017 07:36 PM, Mehdi Amini
      wrote:<br>
    </div>
    <blockquote
      cite="mid:3242F663-F433-4ED4-99CE-59C23BA06DA2@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 Mar 16, 2017, at 5:27 PM, Hal Finkel <<a
              moz-do-not-send="true" href="mailto:hfinkel@anl.gov"
              class="">hfinkel@anl.gov</a>> wrote:</div>
          <br class="Apple-interchange-newline">
          <div class=""><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;
              -webkit-text-stroke-width: 0px;" class="">
            <span 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;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">On 03/16/2017 06:22 PM, Mehdi
              Amini via llvm-dev wrote:</span><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; -webkit-text-stroke-width: 0px;"
              class="">
            <blockquote type="cite" 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-size-adjust: auto;
              -webkit-text-stroke-width: 0px;" class="">
              <blockquote type="cite" class="">On Mar 16, 2017, at 10:29
                AM, Roger Ferrer Ibanez via llvm-dev <<a
                  moz-do-not-send="true"
                  href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>>
                wrote:<br class="">
                <br class="">
                Hi all,<br class="">
                <br class="">
                I'm implementing interleaved source in assembly output.
                Early reviews raised the concern<br class="">
              </blockquote>
              Is there a patch up for review?<br class="">
            </blockquote>
            <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;
              -webkit-text-stroke-width: 0px;" class="">
            <a moz-do-not-send="true"
              href="https://reviews.llvm.org/D30898" 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-size-adjust: auto; -webkit-text-stroke-width:
              0px;" class="">https://reviews.llvm.org/D30898</a><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;
              -webkit-text-stroke-width: 0px;" class="">
            <a moz-do-not-send="true"
              href="https://reviews.llvm.org/D30897" 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-size-adjust: auto; -webkit-text-stroke-width:
              0px;" class="">https://reviews.llvm.org/D30897</a><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;
              -webkit-text-stroke-width: 0px;" class="">
            <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;
              -webkit-text-stroke-width: 0px;" class="">
            <blockquote type="cite" 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-size-adjust: auto;
              -webkit-text-stroke-width: 0px;" class="">I’m wondering
              how is the frontend enabling this interleaved output mode?<br
                class="">
            </blockquote>
            <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;
              -webkit-text-stroke-width: 0px;" class="">
            <span 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;
              -webkit-text-stroke-width: 0px; float: none; display:
              inline !important;" class="">I'm not sure this has been
              really discussed in the review yet (although there
              certainly is a proposed mechanism in the patches).</span><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;
              -webkit-text-stroke-width: 0px;" class="">
          </div>
        </blockquote>
        <div><br class="">
        </div>
        <div>I wonder if the most straightforward way isn’t to leave the
          memorybuffer initialization up to the client, at the same
          place where the setting is (currently MCTargetOptions, not
          sure if it is the right place).</div>
        <div><br class="">
        </div>
        <div>To enable the ASMSource option, client would have to call
          something like  `MCTargetOptions::setAsmInterleavedSourceCode(
          Mode, Buffer);<br>
        </div>
      </div>
    </blockquote>
    <br>
    I think you'd still need a callback, although you could certainly
    set it this way too. The problem is that you potentially need
    buffers corresponding to all files included by the main source file,
    not just the main source file itself. You wouldn't want to open them
    all ahead of time either because, besides being wasteful, you might
    run out of file handles).<br>
    <br>
     -Hal<br>
    <br>
    <blockquote
      cite="mid:3242F663-F433-4ED4-99CE-59C23BA06DA2@apple.com"
      type="cite">
      <div>
        <div><br class="">
        </div>
        <div>— </div>
        <div>Mehdi</div>
        <div><br class="">
        </div>
      </div>
    </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>