[PATCH] D46978: Delay emutls deallocation for one round

Chih-Hung Hsieh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 22 10:01:14 PDT 2018


chh accepted this revision.
chh added a comment.

Only two minor suggestions. Everything looks fine. Thanks.



================
Comment at: lib/builtins/emutls.c:96
+        array->skip_destructor_rounds--;
+        pthread_setspecific(emutls_pthread_key, (void*)array);
+    } else {
----------------
line 96 could be just emutls_setspecific(array).



================
Comment at: lib/builtins/emutls.c:373
             memset(array->data, 0, new_size * sizeof(void*));
+        array->skip_destructor_rounds = EMUTLS_SKIP_DESTRUCTOR_ROUNDS;
         emutls_check_array_set_size(array, new_size);
----------------
nit, line 373 sets array field; it's better to be nested inside the if-statement of line 371.



Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D46978





More information about the llvm-commits mailing list