[compiler-rt] [asan] Speed up ASan ODR indicator-based checking (PR #100923)
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 30 13:52:02 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)
----------------
vitalybuka wrote:
I'd prefer we do this in CheckODRViolationViaIndicator,
so instead of 2 lookups: find + [],
just one one [] there.
https://github.com/llvm/llvm-project/pull/100923
More information about the llvm-commits
mailing list