]> granicus.if.org Git - clang/commit
Remove SelectorTable/SelectorInfo, simply store all selectors in the central Identifi...
authorSteve Naroff <snaroff@apple.com>
Wed, 19 Sep 2007 16:18:46 +0000 (16:18 +0000)
committerSteve Naroff <snaroff@apple.com>
Wed, 19 Sep 2007 16:18:46 +0000 (16:18 +0000)
commit21d5a95b8f50be3e0fdd8c53f92fc201f665a4b4
tree5e88ff7c5b86ae59b842d2582d48210dfbdee089
parent2cc62aad7d4cb604517c6e9decb79596605a2df0
Remove SelectorTable/SelectorInfo, simply store all selectors in the central IdentifierTable.

Rationale:

We currently have a separate table to unique ObjC selectors. Since I don't need all the instance data in IdentifierInfo, I thought this would save space (and make more sense conceptually).

It turns out the cost of having duplicate entries for unary selectors (i.e. names without colons) outweighs the cost difference between the IdentifierInfo & SelectorInfo structures. Here is the data:

Two tables:

*** Selector/Identifier Stats:
# Selectors/Identifiers: 51635
Bytes allocated:         1999824

One table:

*** Identifier Table Stats:
# Identifiers:   49500
Bytes allocated: 1990316

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@42139 91177308-0d34-0410-b5e6-96231b3b80d8
AST/ASTContext.cpp
AST/Expr.cpp
Lex/IdentifierTable.cpp
Sema/SemaDecl.cpp
Sema/SemaExpr.cpp
include/clang/AST/ASTContext.h
include/clang/AST/Decl.h
include/clang/AST/Expr.h
include/clang/Lex/IdentifierTable.h