7081842: assert(Compile::current()->unique() < (uint)MaxNodeLimit) failed: Node limit exceeded

Add missing node limit check in IGVN optimizer

Reviewed-by: iveresov, never
This commit is contained in:
Vladimir Kozlov 2011-09-20 08:39:40 -07:00
parent 9661feecbc
commit a46128d0dd
6 changed files with 48 additions and 13 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -864,6 +864,10 @@ void PhaseIterGVN::optimize() {
// Pull from worklist; transform node;
// If node has changed: update edge info and put uses on worklist.
while( _worklist.size() ) {
if (C->check_node_count(NodeLimitFudgeFactor * 2,
"out of nodes optimizing method")) {
return;
}
Node *n = _worklist.pop();
if (++loop_count >= K * C->unique()) {
debug_only(n->dump(4);)