Add more timers in tokenizer
This commit is contained in:
parent
f3af8b508a
commit
b7631b0390
|
@ -1754,10 +1754,21 @@ bool Tokenizer::simplifyTokens1(const std::string &configuration)
|
||||||
if (!simplifyTokenList1(list.getFiles().front().c_str()))
|
if (!simplifyTokenList1(list.getFiles().front().c_str()))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
if (mTimerResults) {
|
||||||
|
Timer t("Tokenizer::simplifyTokens1::createAst", mSettings->showtime, mTimerResults);
|
||||||
list.createAst();
|
list.createAst();
|
||||||
list.validateAst();
|
list.validateAst();
|
||||||
|
} else {
|
||||||
|
list.createAst();
|
||||||
|
list.validateAst();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mTimerResults) {
|
||||||
|
Timer t("Tokenizer::simplifyTokens1::createSymbolDatabase", mSettings->showtime, mTimerResults);
|
||||||
createSymbolDatabase();
|
createSymbolDatabase();
|
||||||
|
} else {
|
||||||
|
createSymbolDatabase();
|
||||||
|
}
|
||||||
|
|
||||||
// Use symbol database to identify rvalue references. Split && to & &. This is safe, since it doesn't delete any tokens (which might be referenced by symbol database)
|
// Use symbol database to identify rvalue references. Split && to & &. This is safe, since it doesn't delete any tokens (which might be referenced by symbol database)
|
||||||
for (const Variable* var : mSymbolDatabase->variableList()) {
|
for (const Variable* var : mSymbolDatabase->variableList()) {
|
||||||
|
@ -1771,8 +1782,19 @@ bool Tokenizer::simplifyTokens1(const std::string &configuration)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mTimerResults) {
|
||||||
|
Timer t("Tokenizer::simplifyTokens1::setValueType", mSettings->showtime, mTimerResults);
|
||||||
mSymbolDatabase->setValueTypeInTokenList();
|
mSymbolDatabase->setValueTypeInTokenList();
|
||||||
|
} else {
|
||||||
|
mSymbolDatabase->setValueTypeInTokenList();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mTimerResults) {
|
||||||
|
Timer t("Tokenizer::simplifyTokens1::ValueFlow", mSettings->showtime, mTimerResults);
|
||||||
ValueFlow::setValues(&list, mSymbolDatabase, mErrorLogger, mSettings);
|
ValueFlow::setValues(&list, mSymbolDatabase, mErrorLogger, mSettings);
|
||||||
|
} else {
|
||||||
|
ValueFlow::setValues(&list, mSymbolDatabase, mErrorLogger, mSettings);
|
||||||
|
}
|
||||||
|
|
||||||
printDebugOutput(1);
|
printDebugOutput(1);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue