416 return (in(0) && remove_dead_region(phase, can_reshape)) ? this : NULL;
417 }
418
419 //------------------------------Ideal_DU_postCCP-------------------------------
420 // Throw away cast after constant propagation
421 Node *ConstraintCastNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
422 const Type *t = ccp->type(in(1));
423 ccp->hash_delete(this);
424 set_type(t); // Turn into ID function
425 ccp->hash_insert(this);
426 return this;
427 }
428
429
430 //=============================================================================
431
432 //------------------------------Ideal_DU_postCCP-------------------------------
433 // If not converting int->oop, throw away cast after constant propagation
434 Node *CastPPNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
435 const Type *t = ccp->type(in(1));
436 if (!t->isa_oop_ptr()) {
437 return NULL; // do not transform raw pointers
438 }
439 return ConstraintCastNode::Ideal_DU_postCCP(ccp);
440 }
441
442
443
444 //=============================================================================
445 //------------------------------Identity---------------------------------------
446 // If input is already higher or equal to cast type, then this is an identity.
447 Node *CheckCastPPNode::Identity( PhaseTransform *phase ) {
448 // Toned down to rescue meeting at a Phi 3 different oops all implementing
449 // the same interface. CompileTheWorld starting at 502, kd12rc1.zip.
450 return (phase->type(in(1)) == phase->type(this)) ? in(1) : this;
451 }
452
453 // Determine whether "n" is a node which can cause an alias of one of its inputs. Node types
454 // which can create aliases are: CheckCastPP, Phi, and any store (if there is also a load from
455 // the location.)
456 // Note: this checks for aliases created in this compilation, not ones which may
457 // be potentially created at call sites.
|
416 return (in(0) && remove_dead_region(phase, can_reshape)) ? this : NULL;
417 }
418
419 //------------------------------Ideal_DU_postCCP-------------------------------
420 // Throw away cast after constant propagation
421 Node *ConstraintCastNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
422 const Type *t = ccp->type(in(1));
423 ccp->hash_delete(this);
424 set_type(t); // Turn into ID function
425 ccp->hash_insert(this);
426 return this;
427 }
428
429
430 //=============================================================================
431
432 //------------------------------Ideal_DU_postCCP-------------------------------
433 // If not converting int->oop, throw away cast after constant propagation
434 Node *CastPPNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
435 const Type *t = ccp->type(in(1));
436 if (!t->isa_oop_ptr() || in(1)->is_DecodeN()) {
437 return NULL; // do not transform raw pointers or narrow oops
438 }
439 return ConstraintCastNode::Ideal_DU_postCCP(ccp);
440 }
441
442
443
444 //=============================================================================
445 //------------------------------Identity---------------------------------------
446 // If input is already higher or equal to cast type, then this is an identity.
447 Node *CheckCastPPNode::Identity( PhaseTransform *phase ) {
448 // Toned down to rescue meeting at a Phi 3 different oops all implementing
449 // the same interface. CompileTheWorld starting at 502, kd12rc1.zip.
450 return (phase->type(in(1)) == phase->type(this)) ? in(1) : this;
451 }
452
453 // Determine whether "n" is a node which can cause an alias of one of its inputs. Node types
454 // which can create aliases are: CheckCastPP, Phi, and any store (if there is also a load from
455 // the location.)
456 // Note: this checks for aliases created in this compilation, not ones which may
457 // be potentially created at call sites.
|