mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-27 21:30:51 +00:00
[MIR] Speedup parsing of function with large number of basic blocks
Patch eliminates string length calculation when lexing a token. Speedup can be up to 1000x. Differential revision: https://reviews.llvm.org/D83389
This commit is contained in:
parent
9f384ed588
commit
dc367e49cc
@ -563,7 +563,7 @@ MIParser::MIParser(PerFunctionMIParsingState &PFS, SMDiagnostic &Error,
|
||||
|
||||
void MIParser::lex(unsigned SkipChar) {
|
||||
CurrentSource = lexMIToken(
|
||||
CurrentSource.data() + SkipChar, Token,
|
||||
CurrentSource.slice(SkipChar, StringRef::npos), Token,
|
||||
[this](StringRef::iterator Loc, const Twine &Msg) { error(Loc, Msg); });
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user