comparison src/share/vm/opto/phaseX.cpp @ 3958:075ea0ed9e7c

7081842: assert(Compile::current()->unique() < (uint)MaxNodeLimit) failed: Node limit exceeded Summary: Add missing node limit check in IGVN optimizer Reviewed-by: iveresov, never
author kvn
date Tue, 20 Sep 2011 08:39:40 -0700
parents f95d63e2154a
children 670a74b863fc
comparison
equal deleted inserted replaced
3957:5cceda753a4a 3958:075ea0ed9e7c
1 /* 1 /*
2 * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
862 uint loop_count = 0; 862 uint loop_count = 0;
863 863
864 // Pull from worklist; transform node; 864 // Pull from worklist; transform node;
865 // If node has changed: update edge info and put uses on worklist. 865 // If node has changed: update edge info and put uses on worklist.
866 while( _worklist.size() ) { 866 while( _worklist.size() ) {
867 if (C->check_node_count(NodeLimitFudgeFactor * 2,
868 "out of nodes optimizing method")) {
869 return;
870 }
867 Node *n = _worklist.pop(); 871 Node *n = _worklist.pop();
868 if (++loop_count >= K * C->unique()) { 872 if (++loop_count >= K * C->unique()) {
869 debug_only(n->dump(4);) 873 debug_only(n->dump(4);)
870 assert(false, "infinite loop in PhaseIterGVN::optimize"); 874 assert(false, "infinite loop in PhaseIterGVN::optimize");
871 C->record_method_not_compilable("infinite loop in PhaseIterGVN::optimize"); 875 C->record_method_not_compilable("infinite loop in PhaseIterGVN::optimize");