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

src/share/vm/opto/parse1.cpp

Print this page
rev 5411 : 8024069: replace_in_map() should operate on parent maps
Summary: type information gets lost because replace_in_map() doesn't update parent maps
Reviewed-by:


 364 
 365   if (bad_type_exit->control()->req() > 1) {
 366     // Build an uncommon trap here, if any inputs can be unexpected.
 367     bad_type_exit->set_control(_gvn.transform( bad_type_exit->control() ));
 368     record_for_igvn(bad_type_exit->control());
 369     SafePointNode* types_are_good = map();
 370     set_map(bad_type_exit);
 371     // The unexpected type happens because a new edge is active
 372     // in the CFG, which typeflow had previously ignored.
 373     // E.g., Object x = coldAtFirst() && notReached()? "str": new Integer(123).
 374     // This x will be typed as Integer if notReached is not yet linked.
 375     // It could also happen due to a problem in ciTypeFlow analysis.
 376     uncommon_trap(Deoptimization::Reason_constraint,
 377                   Deoptimization::Action_reinterpret);
 378     set_map(types_are_good);
 379   }
 380 }
 381 
 382 //------------------------------Parse------------------------------------------
 383 // Main parser constructor.
 384 Parse::Parse(JVMState* caller, ciMethod* parse_method, float expected_uses)
 385   : _exits(caller)
 386 {
 387   // Init some variables
 388   _caller = caller;
 389   _method = parse_method;
 390   _expected_uses = expected_uses;
 391   _depth = 1 + (caller->has_method() ? caller->depth() : 0);
 392   _wrote_final = false;
 393   _alloc_with_final = NULL;
 394   _entry_bci = InvocationEntryBci;
 395   _tf = NULL;
 396   _block = NULL;
 397   debug_only(_block_count = -1);
 398   debug_only(_blocks = (Block*)-1);
 399 #ifndef PRODUCT
 400   if (PrintCompilation || PrintOpto) {
 401     // Make sure I have an inline tree, so I can print messages about it.
 402     JVMState* ilt_caller = is_osr_parse() ? caller->caller() : caller;
 403     InlineTree::find_subtree_from_root(C->ilt(), ilt_caller, parse_method);
 404   }
 405   _max_switch_depth = 0;




 364 
 365   if (bad_type_exit->control()->req() > 1) {
 366     // Build an uncommon trap here, if any inputs can be unexpected.
 367     bad_type_exit->set_control(_gvn.transform( bad_type_exit->control() ));
 368     record_for_igvn(bad_type_exit->control());
 369     SafePointNode* types_are_good = map();
 370     set_map(bad_type_exit);
 371     // The unexpected type happens because a new edge is active
 372     // in the CFG, which typeflow had previously ignored.
 373     // E.g., Object x = coldAtFirst() && notReached()? "str": new Integer(123).
 374     // This x will be typed as Integer if notReached is not yet linked.
 375     // It could also happen due to a problem in ciTypeFlow analysis.
 376     uncommon_trap(Deoptimization::Reason_constraint,
 377                   Deoptimization::Action_reinterpret);
 378     set_map(types_are_good);
 379   }
 380 }
 381 
 382 //------------------------------Parse------------------------------------------
 383 // Main parser constructor.
 384 Parse::Parse(JVMState* caller, ciMethod* parse_method, float expected_uses, Parse* parent)
 385   : _exits(caller), _parent(parent)
 386 {
 387   // Init some variables
 388   _caller = caller;
 389   _method = parse_method;
 390   _expected_uses = expected_uses;
 391   _depth = 1 + (caller->has_method() ? caller->depth() : 0);
 392   _wrote_final = false;
 393   _alloc_with_final = NULL;
 394   _entry_bci = InvocationEntryBci;
 395   _tf = NULL;
 396   _block = NULL;
 397   debug_only(_block_count = -1);
 398   debug_only(_blocks = (Block*)-1);
 399 #ifndef PRODUCT
 400   if (PrintCompilation || PrintOpto) {
 401     // Make sure I have an inline tree, so I can print messages about it.
 402     JVMState* ilt_caller = is_osr_parse() ? caller->caller() : caller;
 403     InlineTree::find_subtree_from_root(C->ilt(), ilt_caller, parse_method);
 404   }
 405   _max_switch_depth = 0;


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