Lines Matching refs:phase

54 Node *AddNode::Identity( PhaseTransform *phase ) {
56 if( phase->type( in(1) )->higher_equal( zero ) ) return in(2);
57 if( phase->type( in(2) )->higher_equal( zero ) ) return in(1);
109 Node *AddNode::Ideal(PhaseGVN *phase, bool can_reshape) {
110 const Type *t1 = phase->type( in(1) );
111 const Type *t2 = phase->type( in(2) );
131 const Type *t12 = phase->type( add1->in(2) );
145 Node *x2 = phase->makecon( add1->as_Add()->add_ring( t2, t12 ));
146 PhaseIterGVN *igvn = phase->is_IterGVN();
163 const Type *t12 = phase->type( a12 );
169 add2 = phase->transform(add2);
181 const Type *t22 = phase->type( a22 );
188 addx = phase->transform(addx);
192 PhaseIterGVN *igvn = phase->is_IterGVN();
206 const Type *AddNode::Value( PhaseTransform *phase ) const {
208 const Type *t1 = phase->type( in(1) );
209 const Type *t2 = phase->type( in(2) );
239 Node *AddINode::Ideal(PhaseGVN *phase, bool can_reshape) {
253 const Type *t_sub1 = phase->type( in1->in(1) );
254 const Type *t_2 = phase->type( in2 );
256 return new (phase->C) SubINode(phase->makecon( add_ring( t_sub1, t_2 ) ),
263 Node *sub = new (phase->C) SubINode(NULL, NULL);
264 sub->init_req(1, phase->transform(new (phase->C) AddINode(in1->in(1), in2->in(1) ) ));
265 sub->init_req(2, phase->transform(new (phase->C) AddINode(in1->in(2), in2->in(2) ) ));
271 return new (phase->C) AddINode(in1->in(1), in2->in(2));
276 return new (phase->C) AddINode(in1->in(1), in2->in(1));
281 return new (phase->C) SubINode(in1->in(1), in2->in(2));
286 return new (phase->C) SubINode(in2->in(1), in1->in(2));
291 if( op2 == Op_SubI && phase->type(in2->in(1)) == TypeInt::ZERO )
292 return new (phase->C) SubINode(in1, in2->in(2) );
295 if( op1 == Op_SubI && phase->type(in1->in(1)) == TypeInt::ZERO )
296 return new (phase->C) SubINode( in2, in1->in(2) );
311 jint z = phase->type( in1->in(2) )->is_int()->get_con() & 0x1f; // only least significant 5 bits matter
312 jint y = phase->type( in2 )->is_int()->get_con();
315 const Type *t_in11 = phase->type(in1->in(1));
317 Node *a = phase->transform( new (phase->C) AddINode( in1->in(1), phase->intcon(y<<z) ) );
318 return new (phase->C) URShiftINode( a, in1->in(2) );
323 return AddNode::Ideal(phase, can_reshape);
329 Node *AddINode::Identity( PhaseTransform *phase ) {
330 if( in(1)->Opcode() == Op_SubI && phase->eqv(in(1)->in(2),in(2)) ) {
333 else if( in(2)->Opcode() == Op_SubI && phase->eqv(in(2)->in(2),in(1)) ) {
336 return AddNode::Identity(phase);
371 Node *AddLNode::Ideal(PhaseGVN *phase, bool can_reshape) {
386 const Type *t_sub1 = phase->type( in1->in(1) );
387 const Type *t_2 = phase->type( in2 );
389 return new (phase->C) SubLNode(phase->makecon( add_ring( t_sub1, t_2 ) ),
396 Node *sub = new (phase->C) SubLNode(NULL, NULL);
397 sub->init_req(1, phase->transform(new (phase->C) AddLNode(in1->in(1), in2->in(1) ) ));
398 sub->init_req(2, phase->transform(new (phase->C) AddLNode(in1->in(2), in2->in(2) ) ));
404 return new (phase->C) AddLNode(in1->in(1), in2->in(2));
409 return new (phase->C) AddLNode(in1->in(1), in2->in(1));
414 return new (phase->C) SubLNode(in1->in(1), in2->in(2));
419 return new (phase->C) SubLNode(in2->in(1), in1->in(2));
424 if( op2 == Op_SubL && phase->type(in2->in(1)) == TypeLong::ZERO )
425 return new (phase->C) SubLNode( in1, in2->in(2) );
428 if( op1 == Op_SubL && phase->type(in1->in(1)) == TypeInt::ZERO )
429 return new (phase->C) SubLNode( in2, in1->in(2) );
437 Node *shift = phase->transform(new (phase->C) LShiftLNode(in1,phase->intcon(1)));
438 return new (phase->C) AddLNode(shift,in2->in(2));
441 return AddNode::Ideal(phase, can_reshape);
447 Node *AddLNode::Identity( PhaseTransform *phase ) {
448 if( in(1)->Opcode() == Op_SubL && phase->eqv(in(1)->in(2),in(2)) ) {
451 else if( in(2)->Opcode() == Op_SubL && phase->eqv(in(2)->in(2),in(1)) ) {
454 return AddNode::Identity(phase);
513 Node *AddFNode::Ideal(PhaseGVN *phase, bool can_reshape) {
514 if( IdealizedNumerics && !phase->C->method()->is_strict() ) {
515 return AddNode::Ideal(phase, can_reshape); // commutative and associative transforms
520 phase->type( in(1) )->singleton(),
521 phase->type( in(2) )->singleton() ) ? this : NULL;
550 Node *AddDNode::Ideal(PhaseGVN *phase, bool can_reshape) {
551 if( IdealizedNumerics && !phase->C->method()->is_strict() ) {
552 return AddNode::Ideal(phase, can_reshape); // commutative and associative transforms
557 phase->type( in(1) )->singleton(),
558 phase->type( in(2) )->singleton() ) ? this : NULL;
565 Node *AddPNode::Identity( PhaseTransform *phase ) {
566 return ( phase->type( in(Offset) )->higher_equal( TypeX_ZERO ) ) ? in(Address) : this;
570 Node *AddPNode::Ideal(PhaseGVN *phase, bool can_reshape) {
572 if( phase->type( in(Address) ) == Type::TOP ) return NULL;
582 const Type *t = phase->type( addp->in(Offset) );
587 const Type *temp_t2 = phase->type( in(Offset) );
595 offset = phase->MakeConX(t2->get_con() + t12->get_con());
598 address = phase->transform(new (phase->C) AddPNode(in(Base),addp->in(Address),in(Offset)));
601 PhaseIterGVN *igvn = phase->is_IterGVN();
616 if (phase->type(in(Address)) == TypePtr::NULL_PTR) {
618 return new (phase->C) CastX2PNode(offset);
628 const Type *t22 = phase->type( add->in(2) );
630 set_req(Address, phase->transform(new (phase->C) AddPNode(in(Base),in(Address),add->in(1))));
632 PhaseIterGVN *igvn = phase->is_IterGVN();
663 const Type *AddPNode::Value( PhaseTransform *phase ) const {
665 const Type *t1 = phase->type( in(Address) );
666 const Type *t2 = phase->type( in(Offset) );
686 Node* AddPNode::Ideal_base_and_offset(Node* ptr, PhaseTransform* phase,
694 offset = phase->find_intptr_t_con(offs, Type::OffsetBot);
737 Node *OrINode::Identity( PhaseTransform *phase ) {
739 if (phase->eqv(in(1), in(2))) {
743 return AddNode::Identity(phase);
778 Node *OrLNode::Identity( PhaseTransform *phase ) {
780 if (phase->eqv(in(1), in(2))) {
784 return AddNode::Identity(phase);
851 Node *MinINode::Ideal(PhaseGVN *phase, bool can_reshape) {
860 r = phase->transform(new (phase->C) MinINode(l->in(2),r));
908 return new (phase->C) MinINode(r->in(1),phase->transform(new (phase->C) MinINode(l,r->in(2))));
911 if( !phase->eqv(x,y) ) return NULL;
914 return new (phase->C) MinINode(phase->transform(new (phase->C) AddINode(x,phase->intcon(MIN2(x_off,y_off)))),r->in(2));
917 if( !phase->eqv(x,y) ) return NULL;
919 return new (phase->C) AddINode(x,phase->intcon(MIN2(x_off,y_off)));