310 // will make short work of the optimistic pass's deadly loop, 311 // and vice versa. That is a good example of the complementary 312 // purposes of the CCP (optimistic) vs. GVN (pessimistic) phases. 313 // 314 // In any case, only widen or narrow a few times before going to the 315 // correct flavor of top or bottom. 316 // 317 // This call only needs to be made once as the data flows around any 318 // given cycle. We do it at Phis, and nowhere else. 319 // The types presented are the new type of a phi (computed by PhiNode::Value) 320 // and the previously computed type, last time the phi was visited. 321 // 322 // The third argument is upper limit for the saturated value, 323 // if the phase wishes to widen the new_type. 324 // If the phase is narrowing, the old type provides a lower limit. 325 // Caller guarantees that old_type and new_type are no higher than limit_type. 326 virtual const Type* saturate(const Type* new_type, const Type* old_type, 327 const Type* limit_type) const 328 { ShouldNotCallThis(); return NULL; } 329 330 #ifndef PRODUCT 331 void dump_old2new_map() const; 332 void dump_new( uint new_lidx ) const; 333 void dump_types() const; 334 void dump_nodes_and_types(const Node *root, uint depth, bool only_ctrl = true); 335 void dump_nodes_and_types_recur( const Node *n, uint depth, bool only_ctrl, VectorSet &visited); 336 337 uint _count_progress; // For profiling, count transforms that make progress 338 void set_progress() { ++_count_progress; assert( allow_progress(),"No progress allowed during verification"); } 339 void clear_progress() { _count_progress = 0; } 340 uint made_progress() const { return _count_progress; } 341 342 uint _count_transforms; // For profiling, count transforms performed 343 void set_transforms() { ++_count_transforms; } 344 void clear_transforms() { _count_transforms = 0; } 345 uint made_transforms() const{ return _count_transforms; } 346 347 bool _allow_progress; // progress not allowed during verification pass 348 void set_allow_progress(bool allow) { _allow_progress = allow; } 349 bool allow_progress() { return _allow_progress; } | 310 // will make short work of the optimistic pass's deadly loop, 311 // and vice versa. That is a good example of the complementary 312 // purposes of the CCP (optimistic) vs. GVN (pessimistic) phases. 313 // 314 // In any case, only widen or narrow a few times before going to the 315 // correct flavor of top or bottom. 316 // 317 // This call only needs to be made once as the data flows around any 318 // given cycle. We do it at Phis, and nowhere else. 319 // The types presented are the new type of a phi (computed by PhiNode::Value) 320 // and the previously computed type, last time the phi was visited. 321 // 322 // The third argument is upper limit for the saturated value, 323 // if the phase wishes to widen the new_type. 324 // If the phase is narrowing, the old type provides a lower limit. 325 // Caller guarantees that old_type and new_type are no higher than limit_type. 326 virtual const Type* saturate(const Type* new_type, const Type* old_type, 327 const Type* limit_type) const 328 { ShouldNotCallThis(); return NULL; } 329 330 virtual PhaseIterGVN *is_IterGVN() { return 0; } 331 332 #ifndef PRODUCT 333 void dump_old2new_map() const; 334 void dump_new( uint new_lidx ) const; 335 void dump_types() const; 336 void dump_nodes_and_types(const Node *root, uint depth, bool only_ctrl = true); 337 void dump_nodes_and_types_recur( const Node *n, uint depth, bool only_ctrl, VectorSet &visited); 338 339 uint _count_progress; // For profiling, count transforms that make progress 340 void set_progress() { ++_count_progress; assert( allow_progress(),"No progress allowed during verification"); } 341 void clear_progress() { _count_progress = 0; } 342 uint made_progress() const { return _count_progress; } 343 344 uint _count_transforms; // For profiling, count transforms performed 345 void set_transforms() { ++_count_transforms; } 346 void clear_transforms() { _count_transforms = 0; } 347 uint made_transforms() const{ return _count_transforms; } 348 349 bool _allow_progress; // progress not allowed during verification pass 350 void set_allow_progress(bool allow) { _allow_progress = allow; } 351 bool allow_progress() { return _allow_progress; } |