src/share/vm/opto/multnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
6934604 Cdiff src/share/vm/opto/multnode.cpp
src/share/vm/opto/multnode.cpp
Print this page
*** 21,30 ****
--- 21,31 ----
* questions.
*
*/
#include "precompiled.hpp"
+ #include "opto/callnode.hpp"
#include "opto/matcher.hpp"
#include "opto/multnode.hpp"
#include "opto/opcodes.hpp"
#include "opto/phaseX.hpp"
#include "opto/regmask.hpp"
*** 71,87 ****
bool ProjNode::is_CFG() const {
Node *def = in(0);
return (_con == TypeFunc::Control && def->is_CFG());
}
const Type *ProjNode::bottom_type() const {
if (in(0) == NULL) return Type::TOP;
! const Type *tb = in(0)->bottom_type();
! if( tb == Type::TOP ) return Type::TOP;
! if( tb == Type::BOTTOM ) return Type::BOTTOM;
! const TypeTuple *t = tb->is_tuple();
! return t->field_at(_con);
}
const TypePtr *ProjNode::adr_type() const {
if (bottom_type() == Type::MEMORY) {
// in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM
--- 72,101 ----
bool ProjNode::is_CFG() const {
Node *def = in(0);
return (_con == TypeFunc::Control && def->is_CFG());
}
+ const Type* ProjNode::proj_type(const Type* t) const {
+ if (t == Type::TOP) {
+ return Type::TOP;
+ }
+ if (t == Type::BOTTOM) {
+ return Type::BOTTOM;
+ }
+ t = t->is_tuple()->field_at(_con);
+ Node* n = in(0);
+ if ((_con == TypeFunc::Parms) &&
+ n->is_CallStaticJava() && n->as_CallStaticJava()->is_autoboxing()) {
+ // The result of autoboxing is always non-null on normal path.
+ t = t->join(TypePtr::NOTNULL);
+ }
+ return t;
+ }
+
const Type *ProjNode::bottom_type() const {
if (in(0) == NULL) return Type::TOP;
! return proj_type(in(0)->bottom_type());
}
const TypePtr *ProjNode::adr_type() const {
if (bottom_type() == Type::MEMORY) {
// in(0) might be a narrow MemBar; otherwise we will report TypePtr::BOTTOM
*** 113,127 ****
assert(_con < t->is_tuple()->cnt(), "ProjNode::_con must be in range");
}
//------------------------------Value------------------------------------------
const Type *ProjNode::Value( PhaseTransform *phase ) const {
! if( !in(0) ) return Type::TOP;
! const Type *t = phase->type(in(0));
! if( t == Type::TOP ) return t;
! if( t == Type::BOTTOM ) return t;
! return t->is_tuple()->field_at(_con);
}
//------------------------------out_RegMask------------------------------------
// Pass the buck uphill
const RegMask &ProjNode::out_RegMask() const {
--- 127,138 ----
assert(_con < t->is_tuple()->cnt(), "ProjNode::_con must be in range");
}
//------------------------------Value------------------------------------------
const Type *ProjNode::Value( PhaseTransform *phase ) const {
! if (in(0) == NULL) return Type::TOP;
! return proj_type(phase->type(in(0)));
}
//------------------------------out_RegMask------------------------------------
// Pass the buck uphill
const RegMask &ProjNode::out_RegMask() const {
src/share/vm/opto/multnode.cpp
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File