[PATCH] D106206: Lazy initialized the NotUnderValgrind flag

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 19 16:45:22 PDT 2021


mehdi_amini added a comment.

In D106206#2887844 <https://reviews.llvm.org/D106206#2887844>, @vtjnash wrote:

> There doesn't seem to be a reason to make the `VALGRIND_DISCARD_TRANSLATIONS` call conditional. The macro is already a specific sequence of bytes (e.g. `rol` instructions) that are a no-op if valgrind is not running the particular segment of code inside its own JIT

Right, I'm happy to simplify all of this code and just rely on the Valgrind macros. It's a case of Chesterton's fence really: the code was added as-is >10 years ago and it isn't clear what behavior is relied on.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106206



More information about the llvm-commits mailing list