< prev index next >
src/hotspot/share/opto/split_if.cpp
Print this page
@@ -25,10 +25,11 @@
#include "precompiled.hpp"
#include "memory/allocation.inline.hpp"
#include "opto/callnode.hpp"
#include "opto/loopnode.hpp"
#include "opto/movenode.hpp"
+#include "opto/valuetypenode.hpp"
//------------------------------split_thru_region------------------------------
// Split Node 'n' through merge point.
Node *PhaseIdealLoop::split_thru_region( Node *n, Node *region ) {
@@ -192,12 +193,20 @@
const Type* rtype = NULL;
if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::INT) {
rtype = TypeLong::INT;
}
+ // Value types should not be split through Phis but each value input
+ // needs to be merged individually. At this point, value types should
+ // only be used by AllocateNodes. Try to remove redundant allocations
+ // and unlink the now dead value type node.
+ if (n->is_ValueType()) {
+ n->as_ValueType()->remove_redundant_allocations(&_igvn, this);
+ return true; // n is now dead
+ }
+
// Now actually split-up this guy. One copy per control path merging.
- assert(!n->is_ValueType(), "value types should not be split through phis");
Node *phi = PhiNode::make_blank(blk1, n);
for( uint j = 1; j < blk1->req(); j++ ) {
Node *x = n->clone();
// Widen the type of the ConvI2L when pushing up.
if (rtype != NULL) x->as_Type()->set_type(rtype);
< prev index next >