comparison src/share/vm/opto/lcm.cpp @ 6804:e626685e9f6c

7193318: C2: remove number of inputs requirement from Node's new operator Summary: Deleted placement new operator of Node - node(size_t, Compile *, int). Reviewed-by: kvn, twisti Contributed-by: bharadwaj.yadavalli@oracle.com
author kvn
date Thu, 27 Sep 2012 09:38:42 -0700
parents 8c92982cbbc4
children 8e47bac5643a
comparison
equal deleted inserted replaced
6803:06f52c4d0e18 6804:e626685e9f6c
367 // Swap order of projections in basic block to swap branch targets 367 // Swap order of projections in basic block to swap branch targets
368 Node *tmp1 = _nodes[end_idx()+1]; 368 Node *tmp1 = _nodes[end_idx()+1];
369 Node *tmp2 = _nodes[end_idx()+2]; 369 Node *tmp2 = _nodes[end_idx()+2];
370 _nodes.map(end_idx()+1, tmp2); 370 _nodes.map(end_idx()+1, tmp2);
371 _nodes.map(end_idx()+2, tmp1); 371 _nodes.map(end_idx()+2, tmp1);
372 Node *tmp = new (C, 1) Node(C->top()); // Use not NULL input 372 Node *tmp = new (C) Node(C->top()); // Use not NULL input
373 tmp1->replace_by(tmp); 373 tmp1->replace_by(tmp);
374 tmp2->replace_by(tmp1); 374 tmp2->replace_by(tmp1);
375 tmp->replace_by(tmp2); 375 tmp->replace_by(tmp2);
376 tmp->destruct(); 376 tmp->destruct();
377 } 377 }
610 regs.Insert(matcher.c_frame_pointer()); 610 regs.Insert(matcher.c_frame_pointer());
611 611
612 // Set all registers killed and not already defined by the call. 612 // Set all registers killed and not already defined by the call.
613 uint r_cnt = mcall->tf()->range()->cnt(); 613 uint r_cnt = mcall->tf()->range()->cnt();
614 int op = mcall->ideal_Opcode(); 614 int op = mcall->ideal_Opcode();
615 MachProjNode *proj = new (matcher.C, 1) MachProjNode( mcall, r_cnt+1, RegMask::Empty, MachProjNode::fat_proj ); 615 MachProjNode *proj = new (matcher.C) MachProjNode( mcall, r_cnt+1, RegMask::Empty, MachProjNode::fat_proj );
616 bbs.map(proj->_idx,this); 616 bbs.map(proj->_idx,this);
617 _nodes.insert(node_cnt++, proj); 617 _nodes.insert(node_cnt++, proj);
618 618
619 // Select the right register save policy. 619 // Select the right register save policy.
620 const char * save_policy; 620 const char * save_policy;
837 if (n->is_Mach() && n->as_Mach()->has_call()) { 837 if (n->is_Mach() && n->as_Mach()->has_call()) {
838 RegMask regs; 838 RegMask regs;
839 regs.Insert(matcher.c_frame_pointer()); 839 regs.Insert(matcher.c_frame_pointer());
840 regs.OR(n->out_RegMask()); 840 regs.OR(n->out_RegMask());
841 841
842 MachProjNode *proj = new (matcher.C, 1) MachProjNode( n, 1, RegMask::Empty, MachProjNode::fat_proj ); 842 MachProjNode *proj = new (matcher.C) MachProjNode( n, 1, RegMask::Empty, MachProjNode::fat_proj );
843 cfg->_bbs.map(proj->_idx,this); 843 cfg->_bbs.map(proj->_idx,this);
844 _nodes.insert(phi_cnt++, proj); 844 _nodes.insert(phi_cnt++, proj);
845 845
846 add_call_kills(proj, regs, matcher._c_reg_save_policy, false); 846 add_call_kills(proj, regs, matcher._c_reg_save_policy, false);
847 } 847 }