Add a bit to IdentifierInfo that acts as a simple predicate which
tells us whether Preprocessor::HandleIdentifier needs to be called. Because this method is only rarely needed, this saves a call and a bunch of random checks. This drops the time in HandleIdentifier from 3.52ms to .98ms on cocoa.h on my machine. llvm-svn: 62675
Showing
- clang/include/clang/Basic/IdentifierTable.h 59 additions, 7 deletionsclang/include/clang/Basic/IdentifierTable.h
- clang/lib/Basic/IdentifierTable.cpp 1 addition, 0 deletionsclang/lib/Basic/IdentifierTable.cpp
- clang/lib/Lex/Lexer.cpp 3 additions, 1 deletionclang/lib/Lex/Lexer.cpp
- clang/lib/Lex/PTHLexer.cpp 3 additions, 1 deletionclang/lib/Lex/PTHLexer.cpp
- clang/lib/Lex/Preprocessor.cpp 5 additions, 0 deletionsclang/lib/Lex/Preprocessor.cpp
- clang/lib/Lex/TokenLexer.cpp 3 additions, 2 deletionsclang/lib/Lex/TokenLexer.cpp
Loading
Please register or sign in to comment