src/share/vm/opto/castnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File
hotspot Cdiff src/share/vm/opto/castnode.cpp
src/share/vm/opto/castnode.cpp
Print this page
rev 8006 : 8069191: moving predicate out of loops may cause array accesses to bypass null check
Summary: Remove CastPP nodes only during final graph reshape
Reviewed-by:
*** 71,90 ****
// control copies
Node *ConstraintCastNode::Ideal(PhaseGVN *phase, bool can_reshape){
return (in(0) && remove_dead_region(phase, can_reshape)) ? this : NULL;
}
- //------------------------------Ideal_DU_postCCP-------------------------------
- // Throw away cast after constant propagation
- Node *ConstraintCastNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
- const Type *t = ccp->type(in(1));
- ccp->hash_delete(this);
- set_type(t); // Turn into ID function
- ccp->hash_insert(this);
- return this;
- }
-
uint CastIINode::size_of() const {
return sizeof(*this);
}
uint CastIINode::cmp(const Node &n) const {
--- 71,80 ----
*** 162,202 ****
}
}
return res;
}
- Node *CastIINode::Ideal_DU_postCCP(PhaseCCP *ccp) {
- if (_carry_dependency) {
- return NULL;
- }
- return ConstraintCastNode::Ideal_DU_postCCP(ccp);
- }
-
#ifndef PRODUCT
void CastIINode::dump_spec(outputStream *st) const {
TypeNode::dump_spec(st);
if (_carry_dependency) {
st->print(" carry dependency");
}
}
#endif
//=============================================================================
-
- //------------------------------Ideal_DU_postCCP-------------------------------
- // If not converting int->oop, throw away cast after constant propagation
- Node *CastPPNode::Ideal_DU_postCCP( PhaseCCP *ccp ) {
- const Type *t = ccp->type(in(1));
- if (!t->isa_oop_ptr() || ((in(1)->is_DecodeN()) && Matcher::gen_narrow_oop_implicit_null_checks())) {
- return NULL; // do not transform raw pointers or narrow oops
- }
- return ConstraintCastNode::Ideal_DU_postCCP(ccp);
- }
-
-
-
- //=============================================================================
//------------------------------Identity---------------------------------------
// If input is already higher or equal to cast type, then this is an identity.
Node *CheckCastPPNode::Identity( PhaseTransform *phase ) {
// Toned down to rescue meeting at a Phi 3 different oops all implementing
// the same interface. CompileTheWorld starting at 502, kd12rc1.zip.
--- 152,171 ----
src/share/vm/opto/castnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Patch
New
Old
Previous File
Next File