This change fixes a miscompilation of TLS accesses on non-macOS AArch64 systems, in which lookups of the thread pointer would be optimized across function calls where the executing thread might change across the call.
This change implements a conservative fix for this problem by marking that the thread-pointer lookup may have unmodeled side effects. As a result, this change may prevent some otherwise legal optimizations of the thread-pointer lookup. We can readdress this issue in the future if an attribute becomes available to model the effects of thread-pointer lookups more precisely.
This change fixes a miscompilation of TLS accesses on non-macOS AArch64 systems, in which lookups of the thread pointer would be optimized across function calls where the executing thread might change across the call.
This change implements a conservative fix for this problem by marking that the thread-pointer lookup may have unmodeled side effects. As a result, this change may prevent some otherwise legal optimizations of the thread-pointer lookup. We can readdress this issue in the future if an attribute becomes available to model the effects of thread-pointer lookups more precisely.