1.1 --- a/src/share/vm/opto/idealKit.cpp Mon Mar 21 02:30:49 2011 -0700 1.2 +++ b/src/share/vm/opto/idealKit.cpp Mon Mar 21 11:28:14 2011 -0700 1.3 @@ -154,8 +154,18 @@ 1.4 // 1.5 // Pushes the loop top cvstate first, then the else (loop exit) cvstate 1.6 // onto the stack. 1.7 -void IdealKit::loop(IdealVariable& iv, Node* init, BoolTest::mask relop, Node* limit, float prob, float cnt) { 1.8 +void IdealKit::loop(GraphKit* gkit, int nargs, IdealVariable& iv, Node* init, BoolTest::mask relop, Node* limit, float prob, float cnt) { 1.9 assert((state() & (BlockS|LoopS|IfThenS|ElseS)), "bad state for new loop"); 1.10 + 1.11 + // Sync IdealKit and graphKit. 1.12 + gkit->set_all_memory(this->merged_memory()); 1.13 + gkit->set_control(this->ctrl()); 1.14 + // Add loop predicate. 1.15 + gkit->add_predicate(nargs); 1.16 + // Update IdealKit memory. 1.17 + this->set_all_memory(gkit->merged_memory()); 1.18 + this->set_ctrl(gkit->control()); 1.19 + 1.20 set(iv, init); 1.21 Node* head = make_label(1); 1.22 bind(head);