<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 9/14/21 11:27 AM, James Y Knight
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:CAA2zVHpPhhzOu31eE-u7iN088COTkozuZGv=B0o8gx10Lyy2Lw@mail.gmail.com">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<div dir="ltr">
<div dir="ltr">On Tue, Sep 14, 2021 at 2:03 PM Philip Reames via
llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org"
target="_blank" moz-do-not-send="true">llvm-dev@lists.llvm.org</a>>
wrote:<br>
</div>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px
0.8ex;border-left:1px solid
rgb(204,204,204);padding-left:1ex">
In fact, the original motivation for the globalmemonly
proposal could be <br>
alternatively solved with:<br>
<br>
@errno = external global i32<br>
<br>
declare void @mathfunc(float, float) globalmayalias(@errno)</blockquote>
<div><br>
</div>
<div>How would that work, since errno generally isn't a global
(or a compiler-supported thread-local)? It's typically
something along the lines of:</div>
<div> int* __errno_location(void) __attribute__((const));</div>
<div> #define errno *__errno_location()</div>
</div>
</div>
</blockquote>
<p>Didn't actually know that. Johannes point about consistent lies
does apply, but I hadn't had that in mind when I wrote this. We
might also be able to play games with constexpr-like functions
being "similar" to globals, but honestly, I'd probably just take a
different approach for this particular problem. Like, say, the
original RFC in this thread.<br>
</p>
<p>Philip<br>
</p>
</body>
</html>