30 #include "opto/castnode.hpp"
31 #include "opto/divnode.hpp"
32 #include "opto/loopnode.hpp"
33 #include "opto/matcher.hpp"
34 #include "opto/mulnode.hpp"
35 #include "opto/movenode.hpp"
36 #include "opto/opaquenode.hpp"
37 #include "opto/rootnode.hpp"
38 #include "opto/subnode.hpp"
39
40 //=============================================================================
41 //------------------------------split_thru_phi---------------------------------
42 // Split Node 'n' through merge point if there is enough win.
43 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
44 if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) {
45 // ConvI2L may have type information on it which is unsafe to push up
46 // so disable this for now
47 return NULL;
48 }
49
50 int wins = 0;
51 assert(!n->is_CFG(), "");
52 assert(region->is_Region(), "");
53
54 const Type* type = n->bottom_type();
55 const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr();
56 Node *phi;
57 if (t_oop != NULL && t_oop->is_known_instance_field()) {
58 int iid = t_oop->instance_id();
59 int index = C->get_alias_index(t_oop);
60 int offset = t_oop->offset();
61 phi = new PhiNode(region, type, NULL, iid, index, offset);
62 } else {
63 phi = PhiNode::make_blank(region, n);
64 }
65 uint old_unique = C->unique();
66 for (uint i = 1; i < region->req(); i++) {
67 Node *x;
68 Node* the_clone = NULL;
69 if (region->in(i) == C->top()) {
|
30 #include "opto/castnode.hpp"
31 #include "opto/divnode.hpp"
32 #include "opto/loopnode.hpp"
33 #include "opto/matcher.hpp"
34 #include "opto/mulnode.hpp"
35 #include "opto/movenode.hpp"
36 #include "opto/opaquenode.hpp"
37 #include "opto/rootnode.hpp"
38 #include "opto/subnode.hpp"
39
40 //=============================================================================
41 //------------------------------split_thru_phi---------------------------------
42 // Split Node 'n' through merge point if there is enough win.
43 Node *PhaseIdealLoop::split_thru_phi( Node *n, Node *region, int policy ) {
44 if (n->Opcode() == Op_ConvI2L && n->bottom_type() != TypeLong::LONG) {
45 // ConvI2L may have type information on it which is unsafe to push up
46 // so disable this for now
47 return NULL;
48 }
49
50 // Splitting range check CastIIs through a loop induction Phi can
51 // cause new Phis to be created that are left unrelated to the loop
52 // induction Phi and prevent optimizations (vectorization)
53 if (n->Opcode() == Op_CastII && n->as_CastII()->has_range_check()) {
54 return NULL;
55 }
56
57 int wins = 0;
58 assert(!n->is_CFG(), "");
59 assert(region->is_Region(), "");
60
61 const Type* type = n->bottom_type();
62 const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr();
63 Node *phi;
64 if (t_oop != NULL && t_oop->is_known_instance_field()) {
65 int iid = t_oop->instance_id();
66 int index = C->get_alias_index(t_oop);
67 int offset = t_oop->offset();
68 phi = new PhiNode(region, type, NULL, iid, index, offset);
69 } else {
70 phi = PhiNode::make_blank(region, n);
71 }
72 uint old_unique = C->unique();
73 for (uint i = 1; i < region->req(); i++) {
74 Node *x;
75 Node* the_clone = NULL;
76 if (region->in(i) == C->top()) {
|