[PATCH] D46978: Delay emutls deallocation for one round
Chih-Hung Hsieh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 18 15:47:24 PDT 2018
chh added inline comments.
================
Comment at: lib/builtins/emutls.c:33
typedef struct emutls_address_array {
+ int skip_destructor_rounds;
uintptr_t size; /* number of elements in the 'data' array */
----------------
s/int/uintptr_t/
================
Comment at: lib/builtins/emutls.c:350
*/
- return ((index + 1 + 15) & ~((uintptr_t)15)) - 1;
+ int header_words = sizeof(emutls_address_array) / sizeof(void *);
+ return ((index + header_words + 15) & ~((uintptr_t)15)) - header_words;
----------------
s/int/uintptr_t/
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D46978
More information about the llvm-commits
mailing list