mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-12 22:26:14 +00:00
Remember to clear the maximal sets between functions.
Thanks to Nicholas for valgrinding this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37646 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
086f5f350b
commit
6cae7409b1
@ -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<Instruction*> createdExpressions;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user