Eliminate conditional MemorySanitizer instrumentation build flag

Previously REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION was used to
indicate whether a MemorySanitizer enabled build would instrument
Reactor's JIT-compiled code too. This change unconditionally enables it.

It's still possible to selectively disable instrumentation per routine,
using Pragma(MemorySanitizerInstrumentation, false). This and the
underlying behavior of unpoisoning all memory writes are slated to
be removed later.

Bug: b/155148722
Change-Id: Ic8576eb96c15081290427779f835d275580410cc
Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/65848
Kokoro-Result: kokoro <noreply+kokoro@google.com>
Tested-by: Nicolas Capens <nicolascapens@google.com>
Reviewed-by: Alexis Hétu <sugoi@google.com>
diff --git a/CMakeLists.txt b/CMakeLists.txt
index c69489c..7c9b701 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -194,8 +194,6 @@
 option_if_not_defined(REACTOR_EMIT_ASM_FILE "Emit asm files for JIT functions" FALSE)
 option_if_not_defined(REACTOR_ENABLE_PRINT "Enable RR_PRINT macros" FALSE)
 option_if_not_defined(REACTOR_VERIFY_LLVM_IR "Check reactor-generated LLVM IR is valid even in release builds" FALSE)
-# TODO(b/155148722): Remove when unconditionally instrumenting for all build systems.
-option_if_not_defined(REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION "Include JIT in MSAN instrumentation (LLVM backend)" TRUE)
 option_if_not_defined(SWIFTSHADER_LESS_DEBUG_INFO "Generate less debug info to reduce file size" FALSE)
 option_if_not_defined(SWIFTSHADER_ENABLE_VULKAN_DEBUGGER "Enable Vulkan debugger support" FALSE)
 option_if_not_defined(SWIFTSHADER_ENABLE_ASTC "Enable ASTC compressed textures support" TRUE)  # TODO(b/150130101)
diff --git a/src/Reactor/BUILD.gn b/src/Reactor/BUILD.gn
index 86f4bc6..676f99f 100644
--- a/src/Reactor/BUILD.gn
+++ b/src/Reactor/BUILD.gn
@@ -27,11 +27,6 @@
     ]
   } else {
     cflags = [ "-Wno-unused-local-typedef" ]
-    defines = [
-      # Enable instrumentation of Reactor routines for MemorySanitizer builds (LLVM backend).
-      # TODO(b/155148722): Remove when unconditionally instrumenting for all build systems.
-      "REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION=1",
-    ]
   }
 }
 
diff --git a/src/Reactor/CMakeLists.txt b/src/Reactor/CMakeLists.txt
index e27121b..bb49a08 100644
--- a/src/Reactor/CMakeLists.txt
+++ b/src/Reactor/CMakeLists.txt
@@ -68,12 +68,6 @@
     list(APPEND REACTOR_PRIVATE_LINK_LIBRARIES Boost::boost)
 endif(REACTOR_EMIT_DEBUG_INFO)
 
-# Enable instrumentation of Reactor routines for MemorySanitizer builds (LLVM backend).
-# TODO(b/155148722): Remove when unconditionally instrumenting for all build systems.
-if(REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION)
-    list(APPEND REACTOR_PUBLIC_COMPILE_DEFINITIONS "REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION")
-endif()
-
 list(APPEND REACTOR_PRIVATE_COMPILE_DEFINITIONS "REACTOR_ANONYMOUS_MMAP_NAME=swiftshader_jit")
 
 # SubzeroReactor library
diff --git a/src/Reactor/LLVMJIT.cpp b/src/Reactor/LLVMJIT.cpp
index 6fe0ff2..b284aa0 100644
--- a/src/Reactor/LLVMJIT.cpp
+++ b/src/Reactor/LLVMJIT.cpp
@@ -852,11 +852,7 @@
 	module->setTargetTriple(LLVM_DEFAULT_TARGET_TRIPLE);
 	module->setDataLayout(JITGlobals::get()->getDataLayout());
 
-	if(REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION ||
-	   getPragmaState(MemorySanitizerInstrumentation))
-	{
-		msanInstrumentation = true;
-	}
+	msanInstrumentation = getPragmaState(MemorySanitizerInstrumentation);
 }
 
 void JITBuilder::runPasses()
diff --git a/src/Reactor/Pragma.cpp b/src/Reactor/Pragma.cpp
index 73d5920..38e22ad 100644
--- a/src/Reactor/Pragma.cpp
+++ b/src/Reactor/Pragma.cpp
@@ -30,7 +30,7 @@
 
 struct PragmaState
 {
-	bool memorySanitizerInstrumentation = false;
+	bool memorySanitizerInstrumentation = true;
 	int optimizationLevel = 2;  // Default
 };
 
diff --git a/src/Reactor/Reactor.hpp b/src/Reactor/Reactor.hpp
index 4a68b12..d6a796b 100644
--- a/src/Reactor/Reactor.hpp
+++ b/src/Reactor/Reactor.hpp
@@ -61,12 +61,6 @@
 #	define __has_feature(x) 0
 #endif
 
-// Whether Reactor routine instrumentation is enabled for MSan builds.
-// TODO(b/155148722): Remove when unconditionally instrumenting for all build systems.
-#if !defined REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION
-#	define REACTOR_ENABLE_MEMORY_SANITIZER_INSTRUMENTATION 0
-#endif
-
 namespace rr {
 
 struct Caps