<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p><br>
</p>
<div class="moz-cite-prefix">On 05/25/2018 02:40 PM, Richard Smith
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAOfiQq=1oqov1Gk1Y6ebJhJQoufcyRc6pY4evq8QkKeM7sjsqA@mail.gmail.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<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"
moz-do-not-send="true">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" moz-do-not-send="true">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>
</div>
</div>
</blockquote>
<br>
Interesting. I had thought that abi_tag was transitive.<br>
<br>
It occurs to me that Transitive ABI Infection Mechanism (TAIM) has a
reasonable acronym. :-) - I suspect that's what we need in this
case.<br>
<br>
<blockquote type="cite"
cite="mid:CAOfiQq=1oqov1Gk1Y6ebJhJQoufcyRc6pY4evq8QkKeM7sjsqA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<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?</div>
</div>
</div>
</div>
</blockquote>
<br>
I thought about suggesting this, but didn't, because I suspect that
many/most uses will be in header files, just project-internal header
files (because they'll be defining structure layouts, padding
arrays, etc.). I think that such a warning will be pretty noisy,
unfortunately.<br>
<br>
<blockquote type="cite"
cite="mid:CAOfiQq=1oqov1Gk1Y6ebJhJQoufcyRc6pY4evq8QkKeM7sjsqA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<div> 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>
</div>
</blockquote>
<br>
Good point. Do you think that we should file a DR about this? I
imagine that most everyone is going to be in the same boat in this
regard.<br>
<br>
-Hal<br>
<br>
<blockquote type="cite"
cite="mid:CAOfiQq=1oqov1Gk1Y6ebJhJQoufcyRc6pY4evq8QkKeM7sjsqA@mail.gmail.com">
<div dir="ltr">
<div class="gmail_extra">
<div class="gmail_quote">
<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" moz-do-not-send="true">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" moz-do-not-send="true">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"
moz-do-not-send="true">cfe-dev@lists.llvm.org</a><br>
<a
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"
rel="noreferrer" target="_blank" moz-do-not-send="true">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote>
</div>
<br>
</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>