[PATCH] D20485: [esan] Add working set base runtime library
Derek Bruening via llvm-commits
llvm-commits at lists.llvm.org
Mon May 23 08:52:57 PDT 2016
bruening added inline comments.
================
Comment at: lib/esan/working_set.cpp:53
@@ +52,3 @@
+ while (I < NumLines && (uptr)Shadow % 4 != 0) {
+ if ((*Shadow & ShadowAccessedVal) != ShadowAccessedVal)
+ *Shadow |= ShadowAccessedVal;
----------------
aizatsky wrote:
> I don't really see a reason to do an if() check here. Why not blindly "*Shadow |= ShadowAccessedVal"? Is it really faster? I would guess that having a branch is not very good for performance?
The check is faster. In every shadow tool we have ever made it is faster to load, compare, and only store if the value is not already there, than to perform a blind store.
http://reviews.llvm.org/D20485
More information about the llvm-commits
mailing list