1 /*
  2  * Copyright (c) 2005, 2021, Oracle and/or its affiliates. All rights reserved.
  3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  4  *
  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
  7  * published by the Free Software Foundation.
  8  *
  9  * This code is distributed in the hope that it will be useful, but WITHOUT
 10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
 12  * version 2 for more details (a copy is included in the LICENSE file that
 13  * accompanied this code).
 14  *
 15  * You should have received a copy of the GNU General Public License version
 16  * 2 along with this work; if not, write to the Free Software Foundation,
 17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
 18  *
 19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
 20  * or visit www.oracle.com if you need additional information or have any
 21  * questions.
 22  *
 23  */
 24 
 25 #include "precompiled.hpp"
 26 #include "opto/addnode.hpp"
 27 #include "opto/callnode.hpp"
 28 #include "opto/cfgnode.hpp"
 29 #include "opto/idealKit.hpp"
 30 #include "opto/runtime.hpp"
 31 
 32 // Static initialization
 33 
 34 // This declares the position where vars are kept in the cvstate
 35 // For some degree of consistency we use the TypeFunc enum to
 36 // soak up spots in the inputs even though we only use early Control
 37 // and Memory slots. (So far.)
 38 const uint IdealKit::first_var = TypeFunc::Parms + 1;
 39 
 40 //----------------------------IdealKit-----------------------------------------
 41 IdealKit::IdealKit(GraphKit* gkit, bool delay_all_transforms, bool has_declarations) :
 42   C(gkit->C), _gvn(gkit->gvn()) {
 43   _initial_ctrl = gkit->control();
 44   _initial_memory = gkit->merged_memory();
 45   _initial_i_o = gkit->i_o();
 46   _delay_all_transforms = delay_all_transforms;
 47   _var_ct = 0;
 48   _cvstate = NULL;
 49   // We can go memory state free or else we need the entire memory state
 50   assert(_initial_memory == NULL || _initial_memory->Opcode() == Op_MergeMem, "memory must be pre-split");

 51   int init_size = 5;
 52   _pending_cvstates = new (C->node_arena()) GrowableArray<Node*>(C->node_arena(), init_size, 0, 0);
 53   DEBUG_ONLY(_state = new (C->node_arena()) GrowableArray<int>(C->node_arena(), init_size, 0, 0));
 54   if (!has_declarations) {
 55      declarations_done();
 56   }
 57 }
 58 
 59 //----------------------------sync_kit-----------------------------------------
 60 void IdealKit::sync_kit(GraphKit* gkit) {
 61   set_all_memory(gkit->merged_memory());
 62   set_i_o(gkit->i_o());
 63   set_ctrl(gkit->control());
 64 }
 65 
 66 //-------------------------------if_then-------------------------------------
 67 // Create:  if(left relop right)
 68 //          /  \
 69 //   iffalse    iftrue
 70 // Push the iffalse cvstate onto the stack. The iftrue becomes the current cvstate.
 71 void IdealKit::if_then(Node* left, BoolTest::mask relop,
 72                        Node* right, float prob, float cnt, bool push_new_state) {
 73   assert((state() & (BlockS|LoopS|IfThenS|ElseS)), "bad state for new If");
 74   Node* bol;
 75   if (left->bottom_type()->isa_ptr() == NULL) {
 76     if (left->bottom_type()->isa_int() != NULL) {
 77       bol = Bool(CmpI(left, right), relop);
 78     } else {
 79       assert(left->bottom_type()->isa_long() != NULL, "what else?");
 80       bol = Bool(CmpL(left, right), relop);
 81     }

 82   } else {
 83     bol = Bool(CmpP(left, right), relop);
 84   }
 85   if_then(bol, prob, cnt, push_new_state);
 86 }
 87 
 88 void IdealKit::if_then(Node* bol, float prob, float cnt, bool push_new_state) {
 89   // Delay gvn.tranform on if-nodes until construction is finished
 90   // to prevent a constant bool input from discarding a control output.
 91   IfNode* iff = delay_transform(new IfNode(ctrl(), bol, prob, cnt))->as_If();
 92   Node* then  = IfTrue(iff);
 93   Node* elsen = IfFalse(iff);
 94   Node* else_cvstate = copy_cvstate();
 95   else_cvstate->set_req(TypeFunc::Control, elsen);
 96   _pending_cvstates->push(else_cvstate);
 97   DEBUG_ONLY(if (push_new_state) _state->push(IfThenS));
 98   set_ctrl(then);
 99 }
100 
101 //-------------------------------else_-------------------------------------
102 // Pop the else cvstate off the stack, and push the (current) then cvstate.
103 // The else cvstate becomes the current cvstate.
104 void IdealKit::else_() {
105   assert(state() == IfThenS, "bad state for new Else");
106   Node* else_cvstate = _pending_cvstates->pop();
107   DEBUG_ONLY(_state->pop());
108   // save current (then) cvstate for later use at endif
109   _pending_cvstates->push(_cvstate);
110   DEBUG_ONLY(_state->push(ElseS));
111   _cvstate = else_cvstate;
112 }
113 
114 //-------------------------------end_if-------------------------------------
115 // Merge the "then" and "else" cvstates.
116 //
117 // The if_then() pushed a copy of the current state for later use
118 // as the initial state for a future "else" clause.  The
119 // current state then became the initial state for the
120 // then clause.  If an "else" clause was encountered, it will
121 // pop the top state and use it for it's initial state.
122 // It will also push the current state (the state at the end of
123 // the "then" clause) for latter use at the end_if.
124 //
125 // At the endif, the states are:
126 // 1) else exists a) current state is end of "else" clause
127 //                b) top stack state is end of "then" clause
128 //
129 // 2) no else:    a) current state is end of "then" clause
130 //                b) top stack state is from the "if_then" which
131 //                   would have been the initial state of the else.
132 //
133 // Merging the states is accomplished by:
134 //   1) make a label for the merge
135 //   2) terminate the current state with a goto to the label
136 //   3) pop the top state from the stack and make it the
137 //        current state
138 //   4) bind the label at the current state.  Binding a label
139 //        terminates the current state with a goto to the
140 //        label and makes the label's state the current state.
141 //
142 void IdealKit::end_if() {
143   assert(state() & (IfThenS|ElseS), "bad state for new Endif");
144   Node* lab = make_label(1);
145 
146   // Node* join_state = _pending_cvstates->pop();
147                   /* merging, join */
148   goto_(lab);
149   _cvstate = _pending_cvstates->pop();
150 
151   bind(lab);
152   DEBUG_ONLY(_state->pop());
153 }
154 
155 //-------------------------------loop-------------------------------------
156 // Create the loop head portion (*) of:
157 //  *     iv = init
158 //  *  top: (region node)
159 //  *     if (iv relop limit) {
160 //           loop body
161 //           i = i + 1
162 //           goto top
163 //  *     } else // exits loop
164 //
165 // Pushes the loop top cvstate first, then the else (loop exit) cvstate
166 // onto the stack.
167 void IdealKit::loop(GraphKit* gkit, int nargs, IdealVariable& iv, Node* init, BoolTest::mask relop, Node* limit, float prob, float cnt) {
168   assert((state() & (BlockS|LoopS|IfThenS|ElseS)), "bad state for new loop");
169   if (UseLoopPredicate) {
170     // Sync IdealKit and graphKit.
171     gkit->sync_kit(*this);
172     // Add loop predicate.
173     gkit->add_empty_predicates(nargs);
174     // Update IdealKit memory.
175     sync_kit(gkit);
176   }
177   set(iv, init);
178   Node* head = make_label(1);
179   bind(head);
180   _pending_cvstates->push(head); // push for use at end_loop
181   _cvstate = copy_cvstate();
182   if_then(value(iv), relop, limit, prob, cnt, false /* no new state */);
183   DEBUG_ONLY(_state->push(LoopS));
184   assert(ctrl()->is_IfTrue(), "true branch stays in loop");
185   assert(_pending_cvstates->top()->in(TypeFunc::Control)->is_IfFalse(), "false branch exits loop");
186 }
187 
188 //-------------------------------end_loop-------------------------------------
189 // Creates the goto top label.
190 // Expects the else (loop exit) cvstate to be on top of the
191 // stack, and the loop top cvstate to be 2nd.
192 void IdealKit::end_loop() {
193   assert((state() == LoopS), "bad state for new end_loop");
194   Node* exit = _pending_cvstates->pop();
195   Node* head = _pending_cvstates->pop();
196   goto_(head);
197   clear(head);
198   DEBUG_ONLY(_state->pop());
199   _cvstate = exit;
200 }
201 
202 //-------------------------------make_label-------------------------------------
203 // Creates a label.  The number of goto's
204 // must be specified (which should be 1 less than
205 // the number of precedessors.)
206 Node* IdealKit::make_label(int goto_ct) {
207   assert(_cvstate != NULL, "must declare variables before labels");
208   Node* lab = new_cvstate();
209   int sz = 1 + goto_ct + 1 /* fall thru */;
210   Node* reg = delay_transform(new RegionNode(sz));
211   lab->init_req(TypeFunc::Control, reg);
212   return lab;
213 }
214 
215 //-------------------------------bind-------------------------------------
216 // Bind a label at the current cvstate by simulating
217 // a goto to the label.
218 void IdealKit::bind(Node* lab) {
219   goto_(lab, true /* bind */);
220   _cvstate = lab;
221 }
222 
223 //-------------------------------goto_-------------------------------------
224 // Make the current cvstate a predecessor of the label,
225 // creating phi's to merge values.  If bind is true and
226 // this is not the last control edge, then ensure that
227 // all live values have phis created. Used to create phis
228 // at loop-top regions.
229 void IdealKit::goto_(Node* lab, bool bind) {
230   Node* reg = lab->in(TypeFunc::Control);
231   // find next empty slot in region
232   uint slot = 1;
233   while (slot < reg->req() && reg->in(slot) != NULL) slot++;
234   assert(slot < reg->req(), "too many gotos");
235   // If this is last predecessor, then don't force phi creation
236   if (slot == reg->req() - 1) bind = false;
237   reg->init_req(slot, ctrl());
238   assert(first_var + _var_ct == _cvstate->req(), "bad _cvstate size");
239   for (uint i = first_var; i < _cvstate->req(); i++) {
240 
241     // l is the value of var reaching the label. Could be a single value
242     // reaching the label, or a phi that merges multiples values reaching
243     // the label.  The latter is true if the label's input: in(..) is
244     // a phi whose control input is the region node for the label.
245 
246     Node* l = lab->in(i);
247     // Get the current value of the var
248     Node* m = _cvstate->in(i);
249     // If the var went unused no need for a phi
250     if (m == NULL) {
251       continue;
252     } else if (l == NULL || m == l) {
253       // Only one unique value "m" is known to reach this label so a phi
254       // is not yet necessary unless:
255       //    the label is being bound and all predecessors have not been seen,
256       //    in which case "bind" will be true.
257       if (bind) {
258         m = promote_to_phi(m, reg);
259       }
260       // Record the phi/value used for this var in the label's cvstate
261       lab->set_req(i, m);
262     } else {
263       // More than one value for the variable reaches this label so
264       // a create a phi if one does not already exist.
265       if (!was_promoted_to_phi(l, reg)) {
266         l = promote_to_phi(l, reg);
267         lab->set_req(i, l);
268       }
269       // Record in the phi, the var's value from the current state
270       l->set_req(slot, m);
271     }
272   }
273   do_memory_merge(_cvstate, lab);
274   stop();
275 }
276 
277 //-----------------------------promote_to_phi-----------------------------------
278 Node* IdealKit::promote_to_phi(Node* n, Node* reg) {
279   assert(!was_promoted_to_phi(n, reg), "n already promoted to phi on this region");
280   // Get a conservative type for the phi
281   const BasicType bt = n->bottom_type()->basic_type();
282   const Type* ct = Type::get_const_basic_type(bt);
283   return delay_transform(PhiNode::make(reg, n, ct));
284 }
285 
286 //-----------------------------declarations_done-------------------------------
287 void IdealKit::declarations_done() {
288   _cvstate = new_cvstate();   // initialize current cvstate
289   set_ctrl(_initial_ctrl);    // initialize control in current cvstate
290   set_all_memory(_initial_memory);// initialize memory in current cvstate
291   set_i_o(_initial_i_o);      // initialize i_o in current cvstate
292   DEBUG_ONLY(_state->push(BlockS));
293 }
294 
295 //-----------------------------transform-----------------------------------
296 Node* IdealKit::transform(Node* n) {
297   if (_delay_all_transforms) {
298     return delay_transform(n);
299   } else {
300     n = gvn().transform(n);
301     gvn().record_for_igvn(n);
302     return n;
303   }
304 }
305 
306 //-----------------------------delay_transform-----------------------------------
307 Node* IdealKit::delay_transform(Node* n) {
308   // Delay transform until IterativeGVN
309   gvn().set_type(n, n->bottom_type());
310   gvn().record_for_igvn(n);
311   return n;
312 }
313 
314 //-----------------------------new_cvstate-----------------------------------
315 Node* IdealKit::new_cvstate() {
316   uint sz = _var_ct + first_var;
317   return new Node(sz);
318 }
319 
320 //-----------------------------copy_cvstate-----------------------------------
321 Node* IdealKit::copy_cvstate() {
322   Node* ns = new_cvstate();
323   for (uint i = 0; i < ns->req(); i++) ns->init_req(i, _cvstate->in(i));
324   // We must clone memory since it will be updated as we do stores.
325   ns->set_req(TypeFunc::Memory, MergeMemNode::make(ns->in(TypeFunc::Memory)));
326   return ns;
327 }
328 
329 //-----------------------------clear-----------------------------------
330 void IdealKit::clear(Node* m) {
331   for (uint i = 0; i < m->req(); i++) m->set_req(i, NULL);
332 }
333 
334 //-----------------------------IdealVariable----------------------------
335 IdealVariable::IdealVariable(IdealKit &k) {
336   k.declare(this);
337 }
338 
339 Node* IdealKit::memory(uint alias_idx) {
340   MergeMemNode* mem = merged_memory();
341   Node* p = mem->memory_at(alias_idx);
342   _gvn.set_type(p, Type::MEMORY);  // must be mapped
343   return p;
344 }
345 
346 void IdealKit::set_memory(Node* mem, uint alias_idx) {
347   merged_memory()->set_memory_at(alias_idx, mem);
348 }
349 
350 //----------------------------- make_load ----------------------------
351 Node* IdealKit::load(Node* ctl,
352                      Node* adr,
353                      const Type* t,
354                      BasicType bt,
355                      int adr_idx,
356                      bool require_atomic_access,
357                      MemNode::MemOrd mo) {
358 
359   assert(adr_idx != Compile::AliasIdxTop, "use other make_load factory" );
360   const TypePtr* adr_type = NULL; // debug-mode-only argument
361   debug_only(adr_type = C->get_adr_type(adr_idx));
362   Node* mem = memory(adr_idx);
363   Node* ld;
364   if (require_atomic_access && bt == T_LONG) {
365     ld = LoadLNode::make_atomic(ctl, mem, adr, adr_type, t, mo);
366   } else {
367     ld = LoadNode::make(_gvn, ctl, mem, adr, adr_type, t, bt, mo);
368   }
369   return transform(ld);
370 }
371 
372 Node* IdealKit::store(Node* ctl, Node* adr, Node *val, BasicType bt,
373                       int adr_idx,
374                       MemNode::MemOrd mo, bool require_atomic_access,
375                       bool mismatched) {
376   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory");
377   const TypePtr* adr_type = NULL;
378   debug_only(adr_type = C->get_adr_type(adr_idx));
379   Node *mem = memory(adr_idx);
380   Node* st;
381   if (require_atomic_access && bt == T_LONG) {
382     st = StoreLNode::make_atomic(ctl, mem, adr, adr_type, val, mo);
383   } else {
384     st = StoreNode::make(_gvn, ctl, mem, adr, adr_type, val, bt, mo);
385   }
386   if (mismatched) {
387     st->as_Store()->set_mismatched_access();
388   }
389   st = transform(st);
390   set_memory(st, adr_idx);
391 
392   return st;
393 }
394 
395 // Card mark store. Must be ordered so that it will come after the store of
396 // the oop.
397 Node* IdealKit::storeCM(Node* ctl, Node* adr, Node *val, Node* oop_store, int oop_adr_idx,
398                         BasicType bt,
399                         int adr_idx) {
400   assert(adr_idx != Compile::AliasIdxTop, "use other store_to_memory factory" );
401   const TypePtr* adr_type = NULL;
402   debug_only(adr_type = C->get_adr_type(adr_idx));
403   Node *mem = memory(adr_idx);
404 
405   // Add required edge to oop_store, optimizer does not support precedence edges.
406   // Convert required edge to precedence edge before allocation.
407   Node* st = new StoreCMNode(ctl, mem, adr, adr_type, val, oop_store, oop_adr_idx);
408 
409   st = transform(st);
410   set_memory(st, adr_idx);
411 
412   return st;
413 }
414 
415 //---------------------------- do_memory_merge --------------------------------
416 // The memory from one merging cvstate needs to be merged with the memory for another
417 // join cvstate. If the join cvstate doesn't have a merged memory yet then we
418 // can just copy the state from the merging cvstate
419 
420 // Merge one slow path into the rest of memory.
421 void IdealKit::do_memory_merge(Node* merging, Node* join) {
422 
423   // Get the region for the join state
424   Node* join_region = join->in(TypeFunc::Control);
425   assert(join_region != NULL, "join region must exist");
426   if (join->in(TypeFunc::I_O) == NULL ) {
427     join->set_req(TypeFunc::I_O,  merging->in(TypeFunc::I_O));
428   }
429   if (join->in(TypeFunc::Memory) == NULL ) {
430     join->set_req(TypeFunc::Memory,  merging->in(TypeFunc::Memory));
431     return;
432   }
433 
434   // The control flow for merging must have already been attached to the join region
435   // we need its index for the phis.
436   uint slot;
437   for (slot = 1; slot < join_region->req() ; slot ++ ) {
438     if (join_region->in(slot) == merging->in(TypeFunc::Control)) break;
439   }
440   assert(slot !=  join_region->req(), "edge must already exist");
441 
442   MergeMemNode* join_m    = join->in(TypeFunc::Memory)->as_MergeMem();
443   MergeMemNode* merging_m = merging->in(TypeFunc::Memory)->as_MergeMem();
444 
445   // join_m should be an ancestor mergemem of merging
446   // Slow path memory comes from the current map (which is from a slow call)
447   // Fast path/null path memory comes from the call's input
448 
449   // Merge the other fast-memory inputs with the new slow-default memory.
450   // for (MergeMemStream mms(merged_memory(), fast_mem->as_MergeMem()); mms.next_non_empty2(); ) {
451   for (MergeMemStream mms(join_m, merging_m); mms.next_non_empty2(); ) {
452     Node* join_slice = mms.force_memory();
453     Node* merging_slice = mms.memory2();
454     if (join_slice != merging_slice) {
455       PhiNode* phi;
456       // bool new_phi = false;
457       // Is the phi for this slice one that we created for this join region or simply
458       // one we copied? If it is ours then add
459       if (join_slice->is_Phi() && join_slice->as_Phi()->region() == join_region) {
460         phi = join_slice->as_Phi();
461       } else {
462         // create the phi with join_slice filling supplying memory for all of the
463         // control edges to the join region
464         phi = PhiNode::make(join_region, join_slice, Type::MEMORY, mms.adr_type(C));
465         phi = (PhiNode*) delay_transform(phi);
466         // gvn().set_type(phi, Type::MEMORY);
467         // new_phi = true;
468       }
469       // Now update the phi with the slice for the merging slice
470       phi->set_req(slot, merging_slice/* slow_path, slow_slice */);
471       // this updates join_m with the phi
472       mms.set_memory(phi);
473     }
474   }
475 
476   Node* join_io    = join->in(TypeFunc::I_O);
477   Node* merging_io = merging->in(TypeFunc::I_O);
478   if (join_io != merging_io) {
479     PhiNode* phi;
480     if (join_io->is_Phi() && join_io->as_Phi()->region() == join_region) {
481       phi = join_io->as_Phi();
482     } else {
483       phi = PhiNode::make(join_region, join_io, Type::ABIO);
484       phi = (PhiNode*) delay_transform(phi);
485       join->set_req(TypeFunc::I_O, phi);
486     }
487     phi->set_req(slot, merging_io);
488   }
489 }
490 
491 
492 //----------------------------- make_call  ----------------------------
493 // Trivial runtime call
494 Node* IdealKit::make_leaf_call(const TypeFunc *slow_call_type,
495                                address slow_call,
496                                const char *leaf_name,
497                                Node* parm0,
498                                Node* parm1,
499                                Node* parm2,
500                                Node* parm3) {
501 
502   // We only handle taking in RawMem and modifying RawMem
503   const TypePtr* adr_type = TypeRawPtr::BOTTOM;
504   uint adr_idx = C->get_alias_index(adr_type);
505 
506   // Slow-path leaf call
507   CallNode *call =  (CallNode*)new CallLeafNode( slow_call_type, slow_call, leaf_name, adr_type);
508 
509   // Set fixed predefined input arguments
510   call->init_req( TypeFunc::Control, ctrl() );
511   call->init_req( TypeFunc::I_O    , top() )     ;   // does no i/o
512   // Narrow memory as only memory input
513   call->init_req( TypeFunc::Memory , memory(adr_idx));
514   call->init_req( TypeFunc::FramePtr, top() /* frameptr() */ );
515   call->init_req( TypeFunc::ReturnAdr, top() );
516 
517   if (parm0 != NULL)  call->init_req(TypeFunc::Parms+0, parm0);
518   if (parm1 != NULL)  call->init_req(TypeFunc::Parms+1, parm1);
519   if (parm2 != NULL)  call->init_req(TypeFunc::Parms+2, parm2);
520   if (parm3 != NULL)  call->init_req(TypeFunc::Parms+3, parm3);
521 
522   // Node *c = _gvn.transform(call);
523   call = (CallNode *) _gvn.transform(call);
524   Node *c = call; // dbx gets confused with call call->dump()
525 
526   // Slow leaf call has no side-effects, sets few values
527 
528   set_ctrl(transform( new ProjNode(call,TypeFunc::Control) ));
529 
530   // Make memory for the call
531   Node* mem = _gvn.transform( new ProjNode(call, TypeFunc::Memory) );
532 
533   // Set the RawPtr memory state only.
534   set_memory(mem, adr_idx);
535 
536   assert(C->alias_type(call->adr_type()) == C->alias_type(adr_type),
537          "call node must be constructed correctly");
538   Node* res = NULL;
539   if (slow_call_type->range_sig()->cnt() > TypeFunc::Parms) {
540     assert(slow_call_type->range_sig()->cnt() == TypeFunc::Parms+1, "only one return value");
541     res = transform(new ProjNode(call, TypeFunc::Parms));
542   }
543   return res;
544 }
545 
546 void IdealKit::make_leaf_call_no_fp(const TypeFunc *slow_call_type,
547                               address slow_call,
548                               const char *leaf_name,
549                               const TypePtr* adr_type,
550                               Node* parm0,
551                               Node* parm1,
552                               Node* parm2,
553                               Node* parm3) {
554 
555   // We only handle taking in RawMem and modifying RawMem
556   uint adr_idx = C->get_alias_index(adr_type);
557 
558   // Slow-path leaf call
559   CallNode *call =  (CallNode*)new CallLeafNoFPNode( slow_call_type, slow_call, leaf_name, adr_type);
560 
561   // Set fixed predefined input arguments
562   call->init_req( TypeFunc::Control, ctrl() );
563   call->init_req( TypeFunc::I_O    , top() )     ;   // does no i/o
564   // Narrow memory as only memory input
565   call->init_req( TypeFunc::Memory , memory(adr_idx));
566   call->init_req( TypeFunc::FramePtr, top() /* frameptr() */ );
567   call->init_req( TypeFunc::ReturnAdr, top() );
568 
569   if (parm0 != NULL)  call->init_req(TypeFunc::Parms+0, parm0);
570   if (parm1 != NULL)  call->init_req(TypeFunc::Parms+1, parm1);
571   if (parm2 != NULL)  call->init_req(TypeFunc::Parms+2, parm2);
572   if (parm3 != NULL)  call->init_req(TypeFunc::Parms+3, parm3);
573 
574   // Node *c = _gvn.transform(call);
575   call = (CallNode *) _gvn.transform(call);
576   Node *c = call; // dbx gets confused with call call->dump()
577 
578   // Slow leaf call has no side-effects, sets few values
579 
580   set_ctrl(transform( new ProjNode(call,TypeFunc::Control) ));
581 
582   // Make memory for the call
583   Node* mem = _gvn.transform( new ProjNode(call, TypeFunc::Memory) );
584 
585   // Set the RawPtr memory state only.
586   set_memory(mem, adr_idx);
587 
588   assert(C->alias_type(call->adr_type()) == C->alias_type(adr_type),
589          "call node must be constructed correctly");
590 }
--- EOF ---