<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<br>
<div class="moz-cite-prefix">On 05/25/2018 03:41 PM, JF Bastien
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:B6782408-7E14-47F3-80E9-C05D7C24B5CF@apple.com">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<br class="">
<div><br class="">
<blockquote type="cite" class="">
<div class="">On May 25, 2018, at 1:34 PM, Hal Finkel <<a
href="mailto:hfinkel@anl.gov" class=""
moz-do-not-send="true">hfinkel@anl.gov</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class="">
<p class=""><br class="">
</p>
<div class="moz-cite-prefix">On 05/25/2018 02:40 PM,
Richard Smith wrote:<br class="">
</div>
<blockquote type="cite"
cite="mid:CAOfiQq=1oqov1Gk1Y6ebJhJQoufcyRc6pY4evq8QkKeM7sjsqA@mail.gmail.com"
class="">
<div dir="ltr" class="">
<div class="gmail_extra">
<div class="gmail_quote">On 25 May 2018 at 12:15,
Hal Finkel via cfe-dev <span dir="ltr" class=""><<a
href="mailto:cfe-dev@lists.llvm.org"
target="_blank" moz-do-not-send="true"
class="">cfe-dev@lists.llvm.org</a>></span>
wrote:<br class="">
<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" class=""><span
class="gmail-">
<p class=""><br class="">
</p>
<div
class="gmail-m_-7615144704090997817moz-cite-prefix">On
05/25/2018 02:01 PM, Friedman, Eli via
cfe-dev wrote:<br class="">
</div>
<blockquote type="cite" class="">
<div
class="gmail-m_-7615144704090997817moz-cite-prefix">On
5/25/2018 11:46 AM, JF Bastien wrote:<br
class="">
</div>
<blockquote type="cite" class=""> <br
class="">
<div class=""><br class="">
<blockquote type="cite" class="">
<div class="">On May 25, 2018, at
11:38 AM, Friedman, Eli <<a
href="mailto:efriedma@codeaurora.org"
target="_blank"
moz-do-not-send="true" class="">efriedma@codeaurora.org</a>>
wrote:</div>
<br
class="gmail-m_-7615144704090997817Apple-interchange-newline">
<div class="">
<div bgcolor="#FFFFFF" class="">
<div
class="gmail-m_-7615144704090997817moz-cite-prefix">On
5/25/2018 11:29 AM, JF Bastien
via cfe-dev wrote:<br class="">
</div>
<blockquote type="cite" class="">
<div class="">
<div class="">
<ol
class="gmail-m_-7615144704090997817MailOutline">
<li class="">Teach the
target infrastructure
that hardware
interference size is
something they can
specify (in tablegen
files somewhere).</li>
<li class="">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 class="">
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
class="">interference_size, or
else we violate ODR.<br class="">
</div>
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">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 class="">
</div>
</blockquote>
<br class="">
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 class="">
</blockquote>
<br class="">
</span> Unfortunately, to define structure
layouts they need to be constant.<br class="">
<br class="">
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 class="">
</div>
</blockquote>
<div class=""><br class="">
</div>
<div class="">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 class="">
Interesting. I had thought that abi_tag was transitive.<br
class="">
<br class="">
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 class="">
<br class="">
<blockquote type="cite"
cite="mid:CAOfiQq=1oqov1Gk1Y6ebJhJQoufcyRc6pY4evq8QkKeM7sjsqA@mail.gmail.com"
class="">
<div dir="ltr" class="">
<div class="gmail_extra">
<div class="gmail_quote">
<div class=""><br class="">
</div>
<div class="">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 class="">
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
class="">
<br class="">
<blockquote type="cite"
cite="mid:CAOfiQq=1oqov1Gk1Y6ebJhJQoufcyRc6pY4evq8QkKeM7sjsqA@mail.gmail.com"
class="">
<div dir="ltr" class="">
<div class="gmail_extra">
<div class="gmail_quote">
<div class=""> 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 class="">
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 class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
<div>MSVC only ever sets it to 64, so they don’t have this
issue.</div>
</div>
</blockquote>
<br>
For both values on all platforms?<br>
<br>
-Hal<br>
<br>
<blockquote type="cite"
cite="mid:B6782408-7E14-47F3-80E9-C05D7C24B5CF@apple.com">
<div>
<div><br class="">
</div>
<br class="">
<blockquote type="cite" class="">
<div class="">
<div text="#000000" bgcolor="#FFFFFF" class=""> -Hal<br
class="">
<br class="">
<blockquote type="cite"
cite="mid:CAOfiQq=1oqov1Gk1Y6ebJhJQoufcyRc6pY4evq8QkKeM7sjsqA@mail.gmail.com"
class="">
<div dir="ltr" class="">
<div class="gmail_extra">
<div class="gmail_quote">
<div class=""> </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" class=""> -Hal <br
class="">
<br class="">
<blockquote type="cite" class=""><span
class="gmail-"> <br class="">
-Eli<br class="">
<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 class="">
<fieldset
class="gmail-m_-7615144704090997817mimeAttachmentHeader"></fieldset>
<br class="">
</span>
<pre class="">______________________________<wbr class="">_________________
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 class="">mailman/listinfo/cfe-dev</a>
</pre>
</blockquote>
<span class="gmail-"> <br class="">
<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 class="">
______________________________<wbr class="">_________________<br
class="">
cfe-dev mailing list<br class="">
<a href="mailto:cfe-dev@lists.llvm.org"
moz-do-not-send="true" class="">cfe-dev@lists.llvm.org</a><br
class="">
<a
href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"
rel="noreferrer" target="_blank"
moz-do-not-send="true" class="">http://lists.llvm.org/cgi-bin/<wbr
class="">mailman/listinfo/cfe-dev</a><br
class="">
<br class="">
</blockquote>
</div>
<br class="">
</div>
</div>
</blockquote>
<br class="">
<pre class="moz-signature" cols="72">--
Hal Finkel
Lead, Compiler Technology and Programming Languages
Leadership Computing Facility
Argonne National Laboratory</pre>
</div>
</div>
</blockquote>
</div>
<br class="">
</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>