Internals: remove extra width sets

This commit is contained in:
Wilson Snyder
2011-12-22 19:08:49 -05:00
parent fdeb6bcae0
commit b32f925468
3 changed files with 7 additions and 6 deletions
+5 -4
View File
@@ -48,11 +48,12 @@ class EmitCInlines : EmitCBaseVisitor {
virtual void visit(AstVar* nodep, AstNUser*) {
// All wide constants load into variables, so we can just hunt for them
nodep->iterateChildren(*this);
if (nodep->widthWords() >= EMITCINLINES_NUM_CONSTW ) {
if (int(m_wordWidths.size()) <= nodep->widthWords()) {
m_wordWidths.resize(nodep->widthWords()+5);
int words = nodep->widthWords();
if (words >= EMITCINLINES_NUM_CONSTW ) {
if (int(m_wordWidths.size()) <= words) {
m_wordWidths.resize(words+5);
}
++ m_wordWidths.at(nodep->widthWords());
++ m_wordWidths.at(words);
v3Global.needHInlines(true);
}
}