equal
deleted
inserted
replaced
43 extern int explicit_null_checks_elided; |
43 extern int explicit_null_checks_elided; |
44 |
44 |
45 //============================================================================= |
45 //============================================================================= |
46 //------------------------------Value------------------------------------------ |
46 //------------------------------Value------------------------------------------ |
47 // Return a tuple for whichever arm of the IF is reachable |
47 // Return a tuple for whichever arm of the IF is reachable |
48 const Type *IfNode::Value( PhaseTransform *phase ) const { |
48 const Type* IfNode::Value(PhaseGVN* phase) const { |
49 if( !in(0) ) return Type::TOP; |
49 if( !in(0) ) return Type::TOP; |
50 if( phase->type(in(0)) == Type::TOP ) |
50 if( phase->type(in(0)) == Type::TOP ) |
51 return Type::TOP; |
51 return Type::TOP; |
52 const Type *t = phase->type(in(1)); |
52 const Type *t = phase->type(in(1)); |
53 if( t == Type::TOP ) // data is undefined |
53 if( t == Type::TOP ) // data is undefined |
1525 return prev_dom; |
1525 return prev_dom; |
1526 } |
1526 } |
1527 |
1527 |
1528 //------------------------------Identity--------------------------------------- |
1528 //------------------------------Identity--------------------------------------- |
1529 // If the test is constant & we match, then we are the input Control |
1529 // If the test is constant & we match, then we are the input Control |
1530 Node *IfProjNode::Identity(PhaseTransform *phase) { |
1530 Node* IfProjNode::Identity(PhaseGVN* phase) { |
1531 // Can only optimize if cannot go the other way |
1531 // Can only optimize if cannot go the other way |
1532 const TypeTuple *t = phase->type(in(0))->is_tuple(); |
1532 const TypeTuple *t = phase->type(in(0))->is_tuple(); |
1533 if (t == TypeTuple::IFNEITHER || |
1533 if (t == TypeTuple::IFNEITHER || |
1534 // kill dead branch first otherwise the IfNode's control will |
1534 // kill dead branch first otherwise the IfNode's control will |
1535 // have 2 control uses (the IfNode that doesn't go away because |
1535 // have 2 control uses (the IfNode that doesn't go away because |