[PATCH] D109648: [BuildLibCalls] Add globalmemonly to math libcalls that only modify errno

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Sep 11 15:08:32 PDT 2021


jdoerfert added a comment.

In D109648#2996192 <https://reviews.llvm.org/D109648#2996192>, @nikic wrote:

> Is it safe to assume that errno is a "global value" in the LLVM sense? For example, here's how the musl implementation looks like: https://github.com/ifduyue/musl/blob/master/src/errno/__errno_location.c I believe C only requires that errno expands to a thread-local modifiable lvalue, but it does not necessarily have to correspond to a global.

Can we use a target hook to determine if it is? (errno is not the only use case but a good one).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D109648/new/

https://reviews.llvm.org/D109648



More information about the llvm-commits mailing list