<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">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><br></div></div></div>