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 region->is_CountedLoop() && n->in(1) == region->as_CountedLoop()->phi()) {
55 return NULL;
56 }
57
58 int wins = 0;
59 assert(!n->is_CFG(), "");
60 assert(region->is_Region(), "");
61
62 const Type* type = n->bottom_type();
63 const TypeOopPtr *t_oop = _igvn.type(n)->isa_oopptr();
64 Node *phi;
65 if (t_oop != NULL && t_oop->is_known_instance_field()) {
66 int iid = t_oop->instance_id();
67 int index = C->get_alias_index(t_oop);
68 int offset = t_oop->offset();
69 phi = new PhiNode(region, type, NULL, iid, index, offset);
70 } else {
71 phi = PhiNode::make_blank(region, n);
72 }
73 uint old_unique = C->unique();
74 for (uint i = 1; i < region->req(); i++) {
75 Node *x;
76 Node* the_clone = NULL;
77 if (region->in(i) == C->top()) {
|