aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/CodeGen/CodeGenModule.h
diff options
context:
space:
mode:
authorKostya Kortchinsky <kostyak@google.com>2018-02-12 16:59:17 +0000
committerKostya Kortchinsky <kostyak@google.com>2018-02-12 16:59:17 +0000
commit1022220b16123d918fa885b86fd3ca2b3b5683f1 (patch)
tree7aa4e4c2b7ab00a4a0200ceae14086c129f92a68 /clang/lib/CodeGen/CodeGenModule.h
parent07e1337c2a2383ea825494df48743c28715f3ab6 (diff)
downloadllvm-1022220b16123d918fa885b86fd3ca2b3b5683f1.zip
llvm-1022220b16123d918fa885b86fd3ca2b3b5683f1.tar.gz
llvm-1022220b16123d918fa885b86fd3ca2b3b5683f1.tar.bz2
[sanitizer] Size class map & local cache improvements
Summary: - Reland rL324263, this time allowing for a compile-time decision as to whether or not use the 32-bit division. A single test is using a class map covering a maximum size greater than 4GB, this can be checked via the template parameters, and allows SizeClassAllocator64PopulateFreeListOOM to pass; - `MaxCachedHint` is always called on a class id for which we have already computed the size, but we still recompute `Size(class_id)`. Change the prototype of the function to work on sizes instead of class ids. This also allows us to get rid of the `kBatchClassID` special case. Update the callers accordingly; - `InitCache` and `Drain` will start iterating at index 1: index 0 contents are unused and can safely be left to be 0. Plus we do not pay the cost of going through an `UNLIKELY` in `MaxCachedHint`, and touching memory that is otherwise not used; - `const` some variables in the areas modified; - Remove an spurious extra line at the end of a file. Reviewers: alekseyshl, tl0gic, dberris Reviewed By: alekseyshl, dberris Subscribers: dberris, kubamracek, delcypher, llvm-commits, #sanitizers Differential Revision: https://reviews.llvm.org/D43088 llvm-svn: 324906
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.h')
0 files changed, 0 insertions, 0 deletions