llvm-project/clang/lib
Chandler Carruth ff5a01a7b1 [ptr-traits] Switch from a really wasteful SmallDenseMap of
SmallVector<.., 16> (16!!!!) objects to a simple SmallVector of pairs.

This no longer de-duplicates the common function pointers used during
deallocation, but this doesn't really seem worth the complexity and
overhead of managing the map-of-vectors. Notably, there is no reason to
assume that functions have the 4-byte alignment that DenseMap relies on,
and indeed this prevents checking the alignment of the DenseMap keys
because we can't even meaningfully query the alignment of functions
using our existing alignment tools.

Generally, function pointers don't seem like a great idea for keys in
a DenseMap. =]

I chatted with Richard Smith about this a bit as well and have written
down a FIXME because this *does* waste some memory and in general seems
a very clumsy memory management strategy. He would like to see a more
fundamental fix eventually here that tries to build a better pattern.

llvm-svn: 256610
2015-12-30 03:00:23 +00:00
..
ARCMigrate Fix funciton->function typo. 2015-12-16 23:10:46 +00:00
AST [ptr-traits] Switch from a really wasteful SmallDenseMap of 2015-12-30 03:00:23 +00:00
ASTMatchers [ASTMatchers] Add booleanType() matcher. 2015-12-22 20:06:40 +00:00
Analysis Use range-based for loop to avoid the need for calculating an array size. NFC 2015-11-30 03:11:12 +00:00
Basic [OPENMP 4.5] Sema/parsing support for extended format of 'schedule' clause. 2015-12-28 07:25:51 +00:00
CodeGen [TrailingObjects] Convert OffsetOfExpr. 2015-12-29 22:31:18 +00:00
Driver Fix up a comment and a bit of trailing whitespace. 2015-12-28 21:57:05 +00:00
Edit Replace double negation of !FileID.isInvalid() with FileID.isValid(). 2015-10-03 10:46:20 +00:00
Format clang-format: [JS/TypeScript] Support "enum" as property name. 2015-12-29 08:54:23 +00:00
Frontend Refactor: Simplify boolean conditional return statements in lib/Frontend 2015-12-28 15:15:16 +00:00
FrontendTool Provide a BuryPointer for unique_ptrs. 2014-08-29 16:53:14 +00:00
Headers Fix up comment in header. 2015-12-28 19:07:46 +00:00
Index Roll-back r250822. 2015-10-20 13:23:58 +00:00
Lex Emit a -Wmicrosoft warning when treating ^Z as EOF in MS mode. 2015-12-29 23:17:27 +00:00
Parse Silence enumeral and non-enumeral type in conditional expression warning; NFC. 2015-12-28 15:52:46 +00:00
Rewrite Roll-back r250822. 2015-10-20 13:23:58 +00:00
Sema Clean up this code, NFC. 2015-12-30 01:06:52 +00:00
Serialization [TrailingObjects] Convert OffsetOfExpr. 2015-12-29 22:31:18 +00:00
StaticAnalyzer [analyzer] Handle another Android assert function. 2015-12-30 00:08:59 +00:00
Tooling Add fall-back mode for clang tools. 2015-12-03 10:38:53 +00:00
CMakeLists.txt Fix build with various feature flag combinations 2014-07-14 22:17:22 +00:00
Makefile Make clang's rewrite engine a core feature 2014-07-16 16:48:33 +00:00