[cfe-commits] r145082 - /cfe/trunk/lib/Lex/Lexer.cpp
Benjamin Kramer
benny.kra at googlemail.com
Tue Nov 22 12:39:31 PST 2011
Author: d0k
Date: Tue Nov 22 14:39:31 2011
New Revision: 145082
URL: http://llvm.org/viewvc/llvm-project?rev=145082&view=rev
Log:
Remove assert from hot code path and add a clarifying comment.
The assert wasn't adding much value but slowed down Release+Asserts builds.
Modified:
cfe/trunk/lib/Lex/Lexer.cpp
Modified: cfe/trunk/lib/Lex/Lexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/Lexer.cpp?rev=145082&r1=145081&r2=145082&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/Lexer.cpp (original)
+++ cfe/trunk/lib/Lex/Lexer.cpp Tue Nov 22 14:39:31 2011
@@ -1920,10 +1920,10 @@
while (CurPtr+16 <= BufferEnd) {
int cmp = _mm_movemask_epi8(_mm_cmpeq_epi8(*(__m128i*)CurPtr, Slashes));
if (cmp != 0) {
- // Adjust the pointer to the first '/' that was found.
- CurPtr += llvm::CountTrailingZeros_32(cmp);
- C = *CurPtr++;
- assert(C == '/');
+ // Adjust the pointer to point directly after the first slash. It's
+ // not necessary to set C here, it will be overwritten at the end of
+ // the outer loop.
+ CurPtr += llvm::CountTrailingZeros_32(cmp) + 1;
goto FoundSlash;
}
CurPtr += 16;
More information about the cfe-commits
mailing list