[compiler-rt] [asan] Speed up ASan ODR indicator-based checking (PR #100923)

Artem Pianykh via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 31 15:38:26 PDT 2024


================
@@ -225,10 +248,12 @@ static void RegisterGlobal(const Global *g) {
   }
   if (CanPoisonMemory())
     PoisonRedZones(*g);
-  ListOfGlobals *l = new (GetGlobalLowLevelAllocator()) ListOfGlobals;
-  l->g = g;
-  l->next = list_of_all_globals;
-  list_of_all_globals = l;
+
+  AddGlobalToList(list_of_all_globals, g);
+
+  if (UseODRIndicator(g) && g->odr_indicator != UINTPTR_MAX)
----------------
artempyanykh wrote:

@vitalybuka I moved things around. LMK if now looks good.

https://github.com/llvm/llvm-project/pull/100923


More information about the llvm-commits mailing list