hotspot/src/share/vm/opto/phaseX.cpp
changeset 10563 b9b82ff9f0e9
parent 7397 5b173b4ca846
child 10988 a3b2bd43ef4f
--- a/hotspot/src/share/vm/opto/phaseX.cpp	Mon Sep 19 15:21:03 2011 -0700
+++ b/hotspot/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);)