diff --git a/lib/Transforms/Scalar/GVNPRE.cpp b/lib/Transforms/Scalar/GVNPRE.cpp index 91c1cd4d47b..05a28b3f7db 100644 --- a/lib/Transforms/Scalar/GVNPRE.cpp +++ b/lib/Transforms/Scalar/GVNPRE.cpp @@ -297,6 +297,8 @@ ValueTable::Expression ValueTable::create_expression(CmpInst* C) { void ValueTable::clear() { valueNumbering.clear(); expressionNumbering.clear(); + maximalExpressions.clear(); + maximalValues.clear(); nextValueNumber = 1; } @@ -306,10 +308,9 @@ namespace { bool runOnFunction(Function &F); public: static char ID; // Pass identification, replacement for typeid - GVNPRE() : FunctionPass((intptr_t)&ID) { nextValueNumber = 1; } + GVNPRE() : FunctionPass((intptr_t)&ID) { } private: - uint32_t nextValueNumber; ValueTable VN; std::vector createdExpressions;