src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Sdiff src/share/vm/opto

src/share/vm/opto/compile.cpp

Print this page




1136   // Zero out the alias type cache.
1137   Copy::zero_to_bytes(_alias_cache, sizeof(_alias_cache));
1138   // A NULL adr_type hits in the cache right away.  Preload the right answer.
1139   probe_alias_cache(NULL)->_index = AliasIdxTop;
1140 
1141   _intrinsics = NULL;
1142   _macro_nodes = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1143   _predicate_opaqs = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1144   _expensive_nodes = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1145   register_library_intrinsics();
1146 }
1147 
1148 //---------------------------init_start----------------------------------------
1149 // Install the StartNode on this compile object.
1150 void Compile::init_start(StartNode* s) {
1151   if (failing())
1152     return; // already failing
1153   assert(s == start(), "");
1154 }
1155 





1156 StartNode* Compile::start() const {
1157   assert(!failing(), "");
1158   for (DUIterator_Fast imax, i = root()->fast_outs(imax); i < imax; i++) {
1159     Node* start = root()->fast_out(i);
1160     if( start->is_Start() )
1161       return start->as_Start();

1162   }
1163   fatal("Did not find Start node!");
1164   return NULL;
1165 }
1166 
1167 //-------------------------------immutable_memory-------------------------------------
1168 // Access immutable memory
1169 Node* Compile::immutable_memory() {
1170   if (_immutable_memory != NULL) {
1171     return _immutable_memory;
1172   }
1173   StartNode* s = start();
1174   for (DUIterator_Fast imax, i = s->fast_outs(imax); true; i++) {
1175     Node *p = s->fast_out(i);
1176     if (p != s && p->as_Proj()->_con == TypeFunc::Memory) {
1177       _immutable_memory = p;
1178       return _immutable_memory;
1179     }
1180   }
1181   ShouldNotReachHere();




1136   // Zero out the alias type cache.
1137   Copy::zero_to_bytes(_alias_cache, sizeof(_alias_cache));
1138   // A NULL adr_type hits in the cache right away.  Preload the right answer.
1139   probe_alias_cache(NULL)->_index = AliasIdxTop;
1140 
1141   _intrinsics = NULL;
1142   _macro_nodes = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1143   _predicate_opaqs = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1144   _expensive_nodes = new(comp_arena()) GrowableArray<Node*>(comp_arena(), 8,  0, NULL);
1145   register_library_intrinsics();
1146 }
1147 
1148 //---------------------------init_start----------------------------------------
1149 // Install the StartNode on this compile object.
1150 void Compile::init_start(StartNode* s) {
1151   if (failing())
1152     return; // already failing
1153   assert(s == start(), "");
1154 }
1155 
1156 /**
1157  * Return the 'StartNode'. We must not have a pending failure, since the ideal graph
1158  * can be in an inconsistent state, i.e., we can get segmentation faults when traversing
1159  * the ideal graph.
1160  */
1161 StartNode* Compile::start() const {
1162   assert (!failing(), err_msg_res("Must not have pending failure. Reason is: %s", failure_reason()));
1163   for (DUIterator_Fast imax, i = root()->fast_outs(imax); i < imax; i++) {
1164     Node* start = root()->fast_out(i);
1165     if (start->is_Start()) {
1166       return start->as_Start();
1167     }
1168   }
1169   fatal("Did not find Start node!");
1170   return NULL;
1171 }
1172 
1173 //-------------------------------immutable_memory-------------------------------------
1174 // Access immutable memory
1175 Node* Compile::immutable_memory() {
1176   if (_immutable_memory != NULL) {
1177     return _immutable_memory;
1178   }
1179   StartNode* s = start();
1180   for (DUIterator_Fast imax, i = s->fast_outs(imax); true; i++) {
1181     Node *p = s->fast_out(i);
1182     if (p != s && p->as_Proj()->_con == TypeFunc::Memory) {
1183       _immutable_memory = p;
1184       return _immutable_memory;
1185     }
1186   }
1187   ShouldNotReachHere();


src/share/vm/opto/compile.cpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File