<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On 25 May 2018 at 12:15, Hal Finkel via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
  
    
  
  <div bgcolor="#FFFFFF"><span class="gmail-">
    <p><br>
    </p>
    <div class="gmail-m_-7615144704090997817moz-cite-prefix">On 05/25/2018 02:01 PM, Friedman, Eli
      via cfe-dev wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div class="gmail-m_-7615144704090997817moz-cite-prefix">On 5/25/2018 11:46 AM, JF Bastien
        wrote:<br>
      </div>
      <blockquote type="cite"> <br>
        <div><br>
          <blockquote type="cite">
            <div>On May 25, 2018, at 11:38 AM, Friedman, Eli
              <<a href="mailto:efriedma@codeaurora.org" target="_blank">efriedma@codeaurora.org</a>>
              wrote:</div>
            <br class="gmail-m_-7615144704090997817Apple-interchange-newline">
            <div>
              <div bgcolor="#FFFFFF">
                <div class="gmail-m_-7615144704090997817moz-cite-prefix">On 5/25/2018 11:29 AM, JF
                  Bastien via cfe-dev wrote:<br>
                </div>
                <blockquote type="cite">
                  <div>
                    <div>
                      <ol class="gmail-m_-7615144704090997817MailOutline">
                        <li>Teach the target infrastructure
                          that hardware interference size is something
                          they can specify (in tablegen files
                          somewhere).</li>
                        <li>Allow overriding the value in
                          sub-targets using -march or -mcpu (the
                          sub-target defines the numeric value, and the
                          user gets the overriden one by using -march or
                          -mcpu).</li>
                      </ol>
                    </div>
                  </div>
                </blockquote>
                <br>
                We can't change the value based on -mcpu.  We generally
                allow mixing code built with different values of -mcpu. 
                And any code which is linked together must use the same
                value for hardware_destructive_<wbr>interference_size, or
                else we violate ODR.<br>
              </div>
            </div>
          </blockquote>
          <div><br>
          </div>
          <div>Interesting point. The case I’d like to cover is one
            where the developer wants to get the exact right value for
            their particular CPU, instead of a conservative answer with
            extra padding. How do you think we should meet this use
            case?</div>
          <br>
        </div>
      </blockquote>
      <br>
      Go back to the standards committee and ask for a function that
      isn't constexpr?  I can't think of any other reasonable solution.<br>
    </blockquote>
    <br></span>
    Unfortunately, to define structure layouts they need to be constant.<br>
    <br>
    The best solution I've thought of is to extend the abi_tag support
    to force the mangling of interfaces depending on values of these
    constructs to be different.<br></div></blockquote><div><br></div><div>abi_tag is not an effective way of maintaining ABI, because it needs to be "viral" / transitive, and can't be (at least, not without huge developer effort).</div><div><br></div><div>Perhaps we could add an attribute to hardware_{con,de}structive_interference_size that produces a warning if they are used outside the main source file? We'd also need to make them non-inline, which is an observable conformance break, but seems unlikely to be important compared to the other issues.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div bgcolor="#FFFFFF">
     -Hal <br>
    <br>
    <blockquote type="cite"><span class="gmail-"> <br>
      -Eli<br>
      <pre class="gmail-m_-7615144704090997817moz-signature" cols="72">-- 
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project</pre>
      <br>
      <fieldset class="gmail-m_-7615144704090997817mimeAttachmentHeader"></fieldset>
      <br>
      </span><pre>______________________________<wbr>_________________
cfe-dev mailing list
<a class="gmail-m_-7615144704090997817moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>
<a class="gmail-m_-7615144704090997817moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote><span class="gmail-">
    <br>
    <pre class="gmail-m_-7615144704090997817moz-signature" cols="72">-- 
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
  </span></div>

<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div></div>