[PATCH] D129841: [GlobalOpt] Enable evaluation of atomic stores
Alexander Shaposhnikov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 19 01:18:36 PDT 2022
alexander-shaposhnikov added a comment.
Currently Clang does the following: (not fully observable on godbolt but one can build the actual binary and take a look at the global constructors)
1/ https://godbolt.org/z/cqErE8bcj (invocation of the global constructor is replaced with static initialization .word 5)
2/ https://godbolt.org/z/3cfxc41na (not the case for atomic<int>)
With this diff (2) will start to behave like (1).
P.S. Worth noting that https://godbolt.org/z/WKqh7TvbW (line 79: .word 5) (but this is happening due to Clang's frontend, not LLVM's optimizer)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D129841/new/
https://reviews.llvm.org/D129841
More information about the llvm-commits
mailing list