comparison src/share/vm/opto/parse1.cpp @ 10278:6f3fd5150b67

6934604: enable parts of EliminateAutoBox by default Summary: Resurrected autobox elimination code and enabled part of it by default. Reviewed-by: roland, twisti
author kvn
date Wed, 08 May 2013 15:08:01 -0700
parents 5698813d45eb
children 3213ba4d3dff
comparison
equal deleted inserted replaced
10277:aabf54ccedb1 10278:6f3fd5150b67
388 _caller = caller; 388 _caller = caller;
389 _method = parse_method; 389 _method = parse_method;
390 _expected_uses = expected_uses; 390 _expected_uses = expected_uses;
391 _depth = 1 + (caller->has_method() ? caller->depth() : 0); 391 _depth = 1 + (caller->has_method() ? caller->depth() : 0);
392 _wrote_final = false; 392 _wrote_final = false;
393 _alloc_with_final = NULL;
393 _entry_bci = InvocationEntryBci; 394 _entry_bci = InvocationEntryBci;
394 _tf = NULL; 395 _tf = NULL;
395 _block = NULL; 396 _block = NULL;
396 debug_only(_block_count = -1); 397 debug_only(_block_count = -1);
397 debug_only(_blocks = (Block*)-1); 398 debug_only(_blocks = (Block*)-1);
721 _exits.set_control(region); 722 _exits.set_control(region);
722 723
723 // Note: iophi and memphi are not transformed until do_exits. 724 // Note: iophi and memphi are not transformed until do_exits.
724 Node* iophi = new (C) PhiNode(region, Type::ABIO); 725 Node* iophi = new (C) PhiNode(region, Type::ABIO);
725 Node* memphi = new (C) PhiNode(region, Type::MEMORY, TypePtr::BOTTOM); 726 Node* memphi = new (C) PhiNode(region, Type::MEMORY, TypePtr::BOTTOM);
727 gvn().set_type_bottom(iophi);
728 gvn().set_type_bottom(memphi);
726 _exits.set_i_o(iophi); 729 _exits.set_i_o(iophi);
727 _exits.set_all_memory(memphi); 730 _exits.set_all_memory(memphi);
728 731
729 // Add a return value to the exit state. (Do not push it yet.) 732 // Add a return value to the exit state. (Do not push it yet.)
730 if (tf()->range()->cnt() > TypeFunc::Parms) { 733 if (tf()->range()->cnt() > TypeFunc::Parms) {
736 if (ret_oop_type && !ret_oop_type->klass()->is_loaded()) { 739 if (ret_oop_type && !ret_oop_type->klass()->is_loaded()) {
737 ret_type = TypeOopPtr::BOTTOM; 740 ret_type = TypeOopPtr::BOTTOM;
738 } 741 }
739 int ret_size = type2size[ret_type->basic_type()]; 742 int ret_size = type2size[ret_type->basic_type()];
740 Node* ret_phi = new (C) PhiNode(region, ret_type); 743 Node* ret_phi = new (C) PhiNode(region, ret_type);
744 gvn().set_type_bottom(ret_phi);
741 _exits.ensure_stack(ret_size); 745 _exits.ensure_stack(ret_size);
742 assert((int)(tf()->range()->cnt() - TypeFunc::Parms) == ret_size, "good tf range"); 746 assert((int)(tf()->range()->cnt() - TypeFunc::Parms) == ret_size, "good tf range");
743 assert(method()->return_type()->size() == ret_size, "tf agrees w/ method"); 747 assert(method()->return_type()->size() == ret_size, "tf agrees w/ method");
744 _exits.set_argument(0, ret_phi); // here is where the parser finds it 748 _exits.set_argument(0, ret_phi); // here is where the parser finds it
745 // Note: ret_phi is not yet pushed, until do_exits. 749 // Note: ret_phi is not yet pushed, until do_exits.
915 // "All bets are off" unless the first publication occurs after a 919 // "All bets are off" unless the first publication occurs after a
916 // normal return from the constructor. We do not attempt to detect 920 // normal return from the constructor. We do not attempt to detect
917 // such unusual early publications. But no barrier is needed on 921 // such unusual early publications. But no barrier is needed on
918 // exceptional returns, since they cannot publish normally. 922 // exceptional returns, since they cannot publish normally.
919 // 923 //
920 _exits.insert_mem_bar(Op_MemBarRelease); 924 _exits.insert_mem_bar(Op_MemBarRelease, alloc_with_final());
921 #ifndef PRODUCT 925 #ifndef PRODUCT
922 if (PrintOpto && (Verbose || WizardMode)) { 926 if (PrintOpto && (Verbose || WizardMode)) {
923 method()->print_name(); 927 method()->print_name();
924 tty->print_cr(" writes finals and needs a memory barrier"); 928 tty->print_cr(" writes finals and needs a memory barrier");
925 } 929 }