Mercurial > hg > graal-compiler
comparison src/share/vm/opto/output.cpp @ 6948:e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Mon, 12 Nov 2012 23:14:12 +0100 |
parents | c38f13903fdf e626685e9f6c |
children | 291ffc492eb6 |
comparison
equal
deleted
inserted
replaced
6711:ae13cc658b80 | 6948:e522a00b91aa |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
263 | 263 |
264 | 264 |
265 Node* Compile::call_zap_node(MachSafePointNode* node_to_check, int block_no) { | 265 Node* Compile::call_zap_node(MachSafePointNode* node_to_check, int block_no) { |
266 const TypeFunc *tf = OptoRuntime::zap_dead_locals_Type(); | 266 const TypeFunc *tf = OptoRuntime::zap_dead_locals_Type(); |
267 CallStaticJavaNode* ideal_node = | 267 CallStaticJavaNode* ideal_node = |
268 new (this, tf->domain()->cnt()) CallStaticJavaNode( tf, | 268 new (this) CallStaticJavaNode( tf, |
269 OptoRuntime::zap_dead_locals_stub(_method->flags().is_native()), | 269 OptoRuntime::zap_dead_locals_stub(_method->flags().is_native()), |
270 "call zap dead locals stub", 0, TypePtr::BOTTOM); | 270 "call zap dead locals stub", 0, TypePtr::BOTTOM); |
271 // We need to copy the OopMap from the site we're zapping at. | 271 // We need to copy the OopMap from the site we're zapping at. |
272 // We have to make a copy, because the zap site might not be | 272 // We have to make a copy, because the zap site might not be |
273 // a call site, and zap_dead is a call site. | 273 // a call site, and zap_dead is a call site. |
274 OopMap* clone = node_to_check->oop_map()->deep_copy(); | 274 OopMap* clone = node_to_check->oop_map()->deep_copy(); |
275 | 275 |
624 if (sv == NULL) { | 624 if (sv == NULL) { |
625 ciKlass* cik = t->is_oopptr()->klass(); | 625 ciKlass* cik = t->is_oopptr()->klass(); |
626 assert(cik->is_instance_klass() || | 626 assert(cik->is_instance_klass() || |
627 cik->is_array_klass(), "Not supported allocation."); | 627 cik->is_array_klass(), "Not supported allocation."); |
628 sv = new ObjectValue(spobj->_idx, | 628 sv = new ObjectValue(spobj->_idx, |
629 new ConstantOopWriteValue(cik->constant_encoding())); | 629 new ConstantOopWriteValue(cik->java_mirror()->constant_encoding())); |
630 Compile::set_sv_for_object_node(objs, sv); | 630 Compile::set_sv_for_object_node(objs, sv); |
631 | 631 |
632 uint first_ind = spobj->first_index(); | 632 uint first_ind = spobj->first_index(); |
633 for (uint i = 0; i < spobj->n_fields(); i++) { | 633 for (uint i = 0; i < spobj->n_fields(); i++) { |
634 Node* fld_node = sfpt->in(first_ind+i); | 634 Node* fld_node = sfpt->in(first_ind+i); |
713 break; | 713 break; |
714 case Type::AnyPtr: | 714 case Type::AnyPtr: |
715 array->append(new ConstantOopWriteValue(NULL)); | 715 array->append(new ConstantOopWriteValue(NULL)); |
716 break; | 716 break; |
717 case Type::AryPtr: | 717 case Type::AryPtr: |
718 case Type::InstPtr: | 718 case Type::InstPtr: // fall through |
719 case Type::KlassPtr: // fall through | |
720 array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->constant_encoding())); | 719 array->append(new ConstantOopWriteValue(t->isa_oopptr()->const_oop()->constant_encoding())); |
721 break; | 720 break; |
722 case Type::NarrowOop: | 721 case Type::NarrowOop: |
723 if (t == TypeNarrowOop::NULL_PTR) { | 722 if (t == TypeNarrowOop::NULL_PTR) { |
724 array->append(new ConstantOopWriteValue(NULL)); | 723 array->append(new ConstantOopWriteValue(NULL)); |
900 const Type *t = obj_node->bottom_type(); | 899 const Type *t = obj_node->bottom_type(); |
901 ciKlass* cik = t->is_oopptr()->klass(); | 900 ciKlass* cik = t->is_oopptr()->klass(); |
902 assert(cik->is_instance_klass() || | 901 assert(cik->is_instance_klass() || |
903 cik->is_array_klass(), "Not supported allocation."); | 902 cik->is_array_klass(), "Not supported allocation."); |
904 ObjectValue* sv = new ObjectValue(spobj->_idx, | 903 ObjectValue* sv = new ObjectValue(spobj->_idx, |
905 new ConstantOopWriteValue(cik->constant_encoding())); | 904 new ConstantOopWriteValue(cik->java_mirror()->constant_encoding())); |
906 Compile::set_sv_for_object_node(objs, sv); | 905 Compile::set_sv_for_object_node(objs, sv); |
907 | 906 |
908 uint first_ind = spobj->first_index(); | 907 uint first_ind = spobj->first_index(); |
909 for (uint i = 0; i < spobj->n_fields(); i++) { | 908 for (uint i = 0; i < spobj->n_fields(); i++) { |
910 Node* fld_node = sfn->in(first_ind+i); | 909 Node* fld_node = sfn->in(first_ind+i); |
1659 xtty->head("opto_assembly compile_id='%d'%s", compile_id(), | 1658 xtty->head("opto_assembly compile_id='%d'%s", compile_id(), |
1660 is_osr_compilation() ? " compile_kind='osr'" : | 1659 is_osr_compilation() ? " compile_kind='osr'" : |
1661 ""); | 1660 ""); |
1662 } | 1661 } |
1663 if (method() != NULL) { | 1662 if (method() != NULL) { |
1664 method()->print_oop(); | 1663 method()->print_metadata(); |
1665 print_codes(); | |
1666 } | 1664 } |
1667 dump_asm(node_offsets, node_offset_limit); | 1665 dump_asm(node_offsets, node_offset_limit); |
1668 if (xtty != NULL) { | 1666 if (xtty != NULL) { |
1669 xtty->tail("opto_assembly"); | 1667 xtty->tail("opto_assembly"); |
1670 } | 1668 } |
1872 | 1870 |
1873 // Don't optimize this if scheduling is disabled | 1871 // Don't optimize this if scheduling is disabled |
1874 if (!do_scheduling()) | 1872 if (!do_scheduling()) |
1875 return; | 1873 return; |
1876 | 1874 |
1877 assert(MaxVectorSize <= 8, "scheduling code works only with pairs"); | 1875 // Scheduling code works only with pairs (8 bytes) maximum. |
1876 if (max_vector_size() > 8) | |
1877 return; | |
1878 | 1878 |
1879 NOT_PRODUCT( TracePhase t2("isched", &_t_instrSched, TimeCompiler); ) | 1879 NOT_PRODUCT( TracePhase t2("isched", &_t_instrSched, TimeCompiler); ) |
1880 | 1880 |
1881 // Create a data structure for all the scheduling information | 1881 // Create a data structure for all the scheduling information |
1882 Scheduling scheduling(Thread::current()->resource_area(), *this); | 1882 Scheduling scheduling(Thread::current()->resource_area(), *this); |
2685 if( pinch->Opcode() != Op_Node ) { // Or later-def/kill as pinch-point? | 2685 if( pinch->Opcode() != Op_Node ) { // Or later-def/kill as pinch-point? |
2686 later_def = pinch; // Must be def/kill as optimistic pinch-point | 2686 later_def = pinch; // Must be def/kill as optimistic pinch-point |
2687 if ( _pinch_free_list.size() > 0) { | 2687 if ( _pinch_free_list.size() > 0) { |
2688 pinch = _pinch_free_list.pop(); | 2688 pinch = _pinch_free_list.pop(); |
2689 } else { | 2689 } else { |
2690 pinch = new (_cfg->C, 1) Node(1); // Pinch point to-be | 2690 pinch = new (_cfg->C) Node(1); // Pinch point to-be |
2691 } | 2691 } |
2692 if (pinch->_idx >= _regalloc->node_regs_max_index()) { | 2692 if (pinch->_idx >= _regalloc->node_regs_max_index()) { |
2693 _cfg->C->record_method_not_compilable("too many D-U pinch points"); | 2693 _cfg->C->record_method_not_compilable("too many D-U pinch points"); |
2694 return; | 2694 return; |
2695 } | 2695 } |