serge-sans-paille added inline comments.
Comment at: clang/lib/Lex/Lexer.cpp:3520-3521
+LexStart:
+ assert(!Result.needsCleaning() && "Result doesn't need cleaning");
+ assert(!Result.hasPtrData() && "Result has been reset");
foad wrote:
> Messages are
foad added inline comments.
Comment at: clang/lib/Lex/Lexer.cpp:3520-3521
+LexStart:
+ assert(!Result.needsCleaning() && "Result doesn't need cleaning");
+ assert(!Result.hasPtrData() && "Result has been reset");
Messages are backwards. They should be like
This revision was automatically updated to reflect the committed changes.
Closed by commit rGcb3f8d53e6c3: [Lexer] Speedup LexTokenInternal (authored by
serge-sans-paille).
Changed prior to commit:
https://reviews.llvm.org/D137960?vs=475699=475818#toc
Repository:
rG LLVM Github Monorepo
aaron.ballman accepted this revision.
aaron.ballman added a comment.
LGTM! FYI: there's still some unrelated formatting changes ;-)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137960/new/
https://reviews.llvm.org/D137960
___
cfe-commits
serge-sans-paille updated this revision to Diff 475699.
serge-sans-paille added a comment.
Add extra assert to ensure we start lexing in a clean state
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137960/new/
https://reviews.llvm.org/D137960
Files:
clang/include/clang/Lex/Token.h
aaron.ballman added inline comments.
Comment at: clang/lib/Lex/Lexer.cpp:3522
- Result.clearFlag(Token::NeedsCleaning);
- Result.setIdentifierInfo(nullptr);
Was this setting the identifier info to nullptr as a shorthand to clear *any*
token data that was
lattner accepted this revision.
lattner added a comment.
This revision is now accepted and ready to land.
Nice! I'd love someone else's eyes on this, but that's a great speedup!
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137960/new/
serge-sans-paille added a comment.
Compile time tracker record :
https://llvm-compile-time-tracker.com/compare.php?from=f71d32a0eea47b3d2bb43d6be15cf09d47ef6971=b4df7d2a01aacd29ae539b04e72b3667e2362aa1=instructions:u
The cost of preprocessing is hidden by the optimization time, but -O0 gives an
serge-sans-paille created this revision.
serge-sans-paille added reviewers: lattner, nikic.
Herald added a project: All.
serge-sans-paille requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
Only reset "NeedsCleaning" flag in case of