[PATCH] D56038: hwasan: Implement lazy thread initialization for the interceptor ABI.

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 27 14:38:29 PST 2018


eugenis accepted this revision.
eugenis added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp:827
+    IRB.CreateCall(HwasanThreadEnterFunc);
+    LoadInst *ReloadThreadLong = IRB.CreateLoad(SlotPtr);
+
----------------
This could jump back to the earlier load to save an instruction (at the cost of one extra not-taken branch on the slow path).

Or even better, return the new value from the custom calling convention variant of __hwasan_thread_enter. Not in this change, of course.



Repository:
  rL LLVM

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

https://reviews.llvm.org/D56038





More information about the llvm-commits mailing list