Mercurial > hg > graal-compiler
comparison src/share/vm/opto/loopTransform.cpp @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | cd5d10655495 |
children | 89152779163c |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 2000, 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. |
711 switch (n->Opcode()) { | 711 switch (n->Opcode()) { |
712 case Op_XorI: xors_in_loop++; break; // CRC32 java code | 712 case Op_XorI: xors_in_loop++; break; // CRC32 java code |
713 case Op_ModL: body_size += 30; break; | 713 case Op_ModL: body_size += 30; break; |
714 case Op_DivL: body_size += 30; break; | 714 case Op_DivL: body_size += 30; break; |
715 case Op_MulL: body_size += 10; break; | 715 case Op_MulL: body_size += 10; break; |
716 case Op_FlagsProj: | |
717 // Can't handle unrolling of loops containing | |
718 // nodes that generate a FlagsProj at the moment | |
719 return false; | |
716 case Op_StrComp: | 720 case Op_StrComp: |
717 case Op_StrEquals: | 721 case Op_StrEquals: |
718 case Op_StrIndexOf: | 722 case Op_StrIndexOf: |
719 case Op_EncodeISOArray: | 723 case Op_EncodeISOArray: |
720 case Op_AryEq: { | 724 case Op_AryEq: { |
774 } | 778 } |
775 if (bol->as_Bool()->_test._test == BoolTest::ne) | 779 if (bol->as_Bool()->_test._test == BoolTest::ne) |
776 continue; // not RC | 780 continue; // not RC |
777 | 781 |
778 Node *cmp = bol->in(1); | 782 Node *cmp = bol->in(1); |
783 if (cmp->is_FlagsProj()) { | |
784 continue; | |
785 } | |
786 | |
779 Node *rc_exp = cmp->in(1); | 787 Node *rc_exp = cmp->in(1); |
780 Node *limit = cmp->in(2); | 788 Node *limit = cmp->in(2); |
781 | 789 |
782 Node *limit_c = phase->get_ctrl(limit); | 790 Node *limit_c = phase->get_ctrl(limit); |
783 if( limit_c == phase->C->top() ) | 791 if( limit_c == phase->C->top() ) |
2689 } else if (t == T_DOUBLE) { | 2697 } else if (t == T_DOUBLE) { |
2690 store_value = new (C) MoveD2LNode(store_value); | 2698 store_value = new (C) MoveD2LNode(store_value); |
2691 _igvn.register_new_node_with_optimizer(store_value); | 2699 _igvn.register_new_node_with_optimizer(store_value); |
2692 } | 2700 } |
2693 | 2701 |
2694 if (CCallingConventionRequiresIntsAsLongs && | |
2695 // See StubRoutines::select_fill_function for types. FLOAT has been converted to INT. | |
2696 (t == T_FLOAT || t == T_INT || is_subword_type(t))) { | |
2697 store_value = new (C) ConvI2LNode(store_value); | |
2698 _igvn.register_new_node_with_optimizer(store_value); | |
2699 } | |
2700 | |
2701 Node* mem_phi = store->in(MemNode::Memory); | 2702 Node* mem_phi = store->in(MemNode::Memory); |
2702 Node* result_ctrl; | 2703 Node* result_ctrl; |
2703 Node* result_mem; | 2704 Node* result_mem; |
2704 const TypeFunc* call_type = OptoRuntime::array_fill_Type(); | 2705 const TypeFunc* call_type = OptoRuntime::array_fill_Type(); |
2705 CallLeafNode *call = new (C) CallLeafNoFPNode(call_type, fill, | 2706 CallLeafNode *call = new (C) CallLeafNoFPNode(call_type, fill, |
2706 fill_name, TypeAryPtr::get_array_body_type(t)); | 2707 fill_name, TypeAryPtr::get_array_body_type(t)); |
2707 uint cnt = 0; | 2708 call->init_req(TypeFunc::Parms+0, from); |
2708 call->init_req(TypeFunc::Parms + cnt++, from); | 2709 call->init_req(TypeFunc::Parms+1, store_value); |
2709 call->init_req(TypeFunc::Parms + cnt++, store_value); | |
2710 if (CCallingConventionRequiresIntsAsLongs) { | |
2711 call->init_req(TypeFunc::Parms + cnt++, C->top()); | |
2712 } | |
2713 #ifdef _LP64 | 2710 #ifdef _LP64 |
2714 len = new (C) ConvI2LNode(len); | 2711 len = new (C) ConvI2LNode(len); |
2715 _igvn.register_new_node_with_optimizer(len); | 2712 _igvn.register_new_node_with_optimizer(len); |
2716 #endif | 2713 #endif |
2717 call->init_req(TypeFunc::Parms + cnt++, len); | 2714 call->init_req(TypeFunc::Parms+2, len); |
2718 #ifdef _LP64 | 2715 #ifdef _LP64 |
2719 call->init_req(TypeFunc::Parms + cnt++, C->top()); | 2716 call->init_req(TypeFunc::Parms+3, C->top()); |
2720 #endif | 2717 #endif |
2721 call->init_req(TypeFunc::Control, head->init_control()); | 2718 call->init_req( TypeFunc::Control, head->init_control()); |
2722 call->init_req(TypeFunc::I_O, C->top()); // Does no I/O. | 2719 call->init_req( TypeFunc::I_O , C->top() ) ; // does no i/o |
2723 call->init_req(TypeFunc::Memory, mem_phi->in(LoopNode::EntryControl)); | 2720 call->init_req( TypeFunc::Memory , mem_phi->in(LoopNode::EntryControl) ); |
2724 call->init_req(TypeFunc::ReturnAdr, C->start()->proj_out(TypeFunc::ReturnAdr)); | 2721 call->init_req( TypeFunc::ReturnAdr, C->start()->proj_out(TypeFunc::ReturnAdr) ); |
2725 call->init_req(TypeFunc::FramePtr, C->start()->proj_out(TypeFunc::FramePtr)); | 2722 call->init_req( TypeFunc::FramePtr, C->start()->proj_out(TypeFunc::FramePtr) ); |
2726 _igvn.register_new_node_with_optimizer(call); | 2723 _igvn.register_new_node_with_optimizer(call); |
2727 result_ctrl = new (C) ProjNode(call,TypeFunc::Control); | 2724 result_ctrl = new (C) ProjNode(call,TypeFunc::Control); |
2728 _igvn.register_new_node_with_optimizer(result_ctrl); | 2725 _igvn.register_new_node_with_optimizer(result_ctrl); |
2729 result_mem = new (C) ProjNode(call,TypeFunc::Memory); | 2726 result_mem = new (C) ProjNode(call,TypeFunc::Memory); |
2730 _igvn.register_new_node_with_optimizer(result_mem); | 2727 _igvn.register_new_node_with_optimizer(result_mem); |