[PATCH] D14199: [compiler-rt] [tsan] Unify aarch64 mapping

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 9 03:00:06 PST 2015


dvyukov added a comment.

Much nicer now. Thanks.

Do we still need these extern vars in header
extern uptr kLoAppMemBeg
?
I would prefer if we get rid of any remaining usages of these and introduce more functions instead if needed.
They introduce significant amount of boilerplate. And also they are not necessary consts now, so it can be dangerous (performance-wise) to use them occasionally on some performance-critical path.

Also we now have duplication of complex code between MemToShadow for x86 and MemToShadowImpl for power.
Please move x86 consts to a Mapping struct as well. Then we can have a single MemToShadowImpl implementation and then define MemToShadow as:

uptr MemToShadowImpl(uptr x) {
#ifdef power

  if (vmaSize == 39)
    return MemToShadowImpl<Mapping39>(x);
  else
    return MemToShadowImpl<Mapping42>(x);

#else

  return MemToShadowImpl<Mapping>(x);

#endif
}


http://reviews.llvm.org/D14199





More information about the llvm-commits mailing list