[PATCH] D46961: [scudo] Quarantine optimization
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 16 10:31:09 PDT 2018
cryptoad added a comment.
In https://reviews.llvm.org/D46961#1101608, @dvyukov wrote:
> - const uptr BatchClassId = SizeClassMap::ClassID(sizeof(QuarantineBatch));
>
> Shouldn't it be constexpr? Or at least static const?
`SizeClassMap::ClassID` can't be made C++11 `constexpr` due to branches, so `BatchClassId` can't be made `constexpr`.
Making it `static const` makes the compiler use `__cxa_guard_acquire` & `__cxa_guard_release` which we don't want to be able to stay free of libc++ dependencies.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D46961
More information about the llvm-commits
mailing list