diff 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
line wrap: on
line diff
--- a/src/share/vm/opto/phaseX.cpp	Mon Sep 19 15:21:03 2011 -0700
+++ b/src/share/vm/opto/phaseX.cpp	Tue Sep 20 08:39:40 2011 -0700
@@ -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 @@
   // 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);)