[PATCH] D43088: [sanitizer] Size class map & local cache improvements
Kostya Kortchinsky via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 9 15:02:19 PST 2018
cryptoad marked 3 inline comments as done.
cryptoad added inline comments.
================
Comment at: lib/sanitizer_common/sanitizer_allocator_local_cache.h:101
+ c->max_count = 2 * SizeClassMap::MaxCachedHint(size);
+ c->class_size = size;
}
----------------
alekseyshl wrote:
> cryptoad wrote:
> > alekseyshl wrote:
> > > Does
> > >
> > > c->class_size = Allocator::ClassIdToSize(i);
> > > c->max_count = 2 * SizeClassMap::MaxCachedHint(c->class_size);
> > >
> > > lead to less optimal code?
> > It leads to almost exactly the same asm (at least for x64).
> > Do you prefer yours?
> Yep, mine is more concise.
After discussion, having a `const uptr size` looks safer to prevent a potential refetching. So this will stay as is.
Repository:
rCRT Compiler Runtime
https://reviews.llvm.org/D43088
More information about the llvm-commits
mailing list