comparison src/share/vm/opto/idealKit.cpp @ 2385:0e3ed5a14f73

Merge
author jcoomes
date Thu, 24 Mar 2011 23:04:36 -0700
parents 9dc311b8473e
children 1d1603768966 07acc51c1d2a
comparison
equal deleted inserted replaced
2381:f195ebb181b8 2385:0e3ed5a14f73
152 // goto top 152 // goto top
153 // * } else // exits loop 153 // * } else // exits loop
154 // 154 //
155 // Pushes the loop top cvstate first, then the else (loop exit) cvstate 155 // Pushes the loop top cvstate first, then the else (loop exit) cvstate
156 // onto the stack. 156 // onto the stack.
157 void IdealKit::loop(IdealVariable& iv, Node* init, BoolTest::mask relop, Node* limit, float prob, float cnt) { 157 void IdealKit::loop(GraphKit* gkit, int nargs, IdealVariable& iv, Node* init, BoolTest::mask relop, Node* limit, float prob, float cnt) {
158 assert((state() & (BlockS|LoopS|IfThenS|ElseS)), "bad state for new loop"); 158 assert((state() & (BlockS|LoopS|IfThenS|ElseS)), "bad state for new loop");
159
160 // Sync IdealKit and graphKit.
161 gkit->set_all_memory(this->merged_memory());
162 gkit->set_control(this->ctrl());
163 // Add loop predicate.
164 gkit->add_predicate(nargs);
165 // Update IdealKit memory.
166 this->set_all_memory(gkit->merged_memory());
167 this->set_ctrl(gkit->control());
168
159 set(iv, init); 169 set(iv, init);
160 Node* head = make_label(1); 170 Node* head = make_label(1);
161 bind(head); 171 bind(head);
162 _pending_cvstates->push(head); // push for use at end_loop 172 _pending_cvstates->push(head); // push for use at end_loop
163 _cvstate = copy_cvstate(); 173 _cvstate = copy_cvstate();