Mercurial > hg > truffle
comparison src/share/vm/opto/loopTransform.cpp @ 8701:b95ad0610fef
Merge
author | asaha |
---|---|
date | Fri, 26 Oct 2012 09:27:25 -0700 |
parents | 521c82b9cbf8 d804e148cff8 |
children | b5cb079ecaa4 |
comparison
equal
deleted
inserted
replaced
6908:5a3a6dac85e2 | 8701:b95ad0610fef |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 2000, 2011, 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. |
90 Node* limit_n = cl->limit(); | 90 Node* limit_n = cl->limit(); |
91 if (init_n != NULL && init_n->is_Con() && | 91 if (init_n != NULL && init_n->is_Con() && |
92 limit_n != NULL && limit_n->is_Con()) { | 92 limit_n != NULL && limit_n->is_Con()) { |
93 // Use longs to avoid integer overflow. | 93 // Use longs to avoid integer overflow. |
94 int stride_con = cl->stride_con(); | 94 int stride_con = cl->stride_con(); |
95 long init_con = cl->init_trip()->get_int(); | 95 jlong init_con = cl->init_trip()->get_int(); |
96 long limit_con = cl->limit()->get_int(); | 96 jlong limit_con = cl->limit()->get_int(); |
97 int stride_m = stride_con - (stride_con > 0 ? 1 : -1); | 97 int stride_m = stride_con - (stride_con > 0 ? 1 : -1); |
98 long trip_count = (limit_con - init_con + stride_m)/stride_con; | 98 jlong trip_count = (limit_con - init_con + stride_m)/stride_con; |
99 if (trip_count > 0 && (julong)trip_count < (julong)max_juint) { | 99 if (trip_count > 0 && (julong)trip_count < (julong)max_juint) { |
100 // Set exact trip count. | 100 // Set exact trip count. |
101 cl->set_exact_trip_count((uint)trip_count); | 101 cl->set_exact_trip_count((uint)trip_count); |
102 } | 102 } |
103 } | 103 } |
222 Node* inv2_c = phase->get_ctrl(inv2); | 222 Node* inv2_c = phase->get_ctrl(inv2); |
223 Node* n_inv1; | 223 Node* n_inv1; |
224 if (neg_inv1) { | 224 if (neg_inv1) { |
225 Node *zero = phase->_igvn.intcon(0); | 225 Node *zero = phase->_igvn.intcon(0); |
226 phase->set_ctrl(zero, phase->C->root()); | 226 phase->set_ctrl(zero, phase->C->root()); |
227 n_inv1 = new (phase->C, 3) SubINode(zero, inv1); | 227 n_inv1 = new (phase->C) SubINode(zero, inv1); |
228 phase->register_new_node(n_inv1, inv1_c); | 228 phase->register_new_node(n_inv1, inv1_c); |
229 } else { | 229 } else { |
230 n_inv1 = inv1; | 230 n_inv1 = inv1; |
231 } | 231 } |
232 Node* inv; | 232 Node* inv; |
233 if (neg_inv2) { | 233 if (neg_inv2) { |
234 inv = new (phase->C, 3) SubINode(n_inv1, inv2); | 234 inv = new (phase->C) SubINode(n_inv1, inv2); |
235 } else { | 235 } else { |
236 inv = new (phase->C, 3) AddINode(n_inv1, inv2); | 236 inv = new (phase->C) AddINode(n_inv1, inv2); |
237 } | 237 } |
238 phase->register_new_node(inv, phase->get_early_ctrl(inv)); | 238 phase->register_new_node(inv, phase->get_early_ctrl(inv)); |
239 | 239 |
240 Node* addx; | 240 Node* addx; |
241 if (neg_x) { | 241 if (neg_x) { |
242 addx = new (phase->C, 3) SubINode(inv, x); | 242 addx = new (phase->C) SubINode(inv, x); |
243 } else { | 243 } else { |
244 addx = new (phase->C, 3) AddINode(x, inv); | 244 addx = new (phase->C) AddINode(x, inv); |
245 } | 245 } |
246 phase->register_new_node(addx, phase->get_ctrl(x)); | 246 phase->register_new_node(addx, phase->get_ctrl(x)); |
247 phase->_igvn.replace_node(n1, addx); | 247 phase->_igvn.replace_node(n1, addx); |
248 assert(phase->get_loop(phase->get_ctrl(n1)) == this, ""); | 248 assert(phase->get_loop(phase->get_ctrl(n1)) == this, ""); |
249 _body.yank(n1); | 249 _body.yank(n1); |
930 // Reduce the post-loop trip count. | 930 // Reduce the post-loop trip count. |
931 CountedLoopEndNode* post_end = old_new[main_end ->_idx]->as_CountedLoopEnd(); | 931 CountedLoopEndNode* post_end = old_new[main_end ->_idx]->as_CountedLoopEnd(); |
932 post_end->_prob = PROB_FAIR; | 932 post_end->_prob = PROB_FAIR; |
933 | 933 |
934 // Build the main-loop normal exit. | 934 // Build the main-loop normal exit. |
935 IfFalseNode *new_main_exit = new (C, 1) IfFalseNode(main_end); | 935 IfFalseNode *new_main_exit = new (C) IfFalseNode(main_end); |
936 _igvn.register_new_node_with_optimizer( new_main_exit ); | 936 _igvn.register_new_node_with_optimizer( new_main_exit ); |
937 set_idom(new_main_exit, main_end, dd_main_exit ); | 937 set_idom(new_main_exit, main_end, dd_main_exit ); |
938 set_loop(new_main_exit, loop->_parent); | 938 set_loop(new_main_exit, loop->_parent); |
939 | 939 |
940 // Step A2: Build a zero-trip guard for the post-loop. After leaving the | 940 // Step A2: Build a zero-trip guard for the post-loop. After leaving the |
941 // main-loop, the post-loop may not execute at all. We 'opaque' the incr | 941 // main-loop, the post-loop may not execute at all. We 'opaque' the incr |
942 // (the main-loop trip-counter exit value) because we will be changing | 942 // (the main-loop trip-counter exit value) because we will be changing |
943 // the exit value (via unrolling) so we cannot constant-fold away the zero | 943 // the exit value (via unrolling) so we cannot constant-fold away the zero |
944 // trip guard until all unrolling is done. | 944 // trip guard until all unrolling is done. |
945 Node *zer_opaq = new (C, 2) Opaque1Node(C, incr); | 945 Node *zer_opaq = new (C) Opaque1Node(C, incr); |
946 Node *zer_cmp = new (C, 3) CmpINode( zer_opaq, limit ); | 946 Node *zer_cmp = new (C) CmpINode( zer_opaq, limit ); |
947 Node *zer_bol = new (C, 2) BoolNode( zer_cmp, b_test ); | 947 Node *zer_bol = new (C) BoolNode( zer_cmp, b_test ); |
948 register_new_node( zer_opaq, new_main_exit ); | 948 register_new_node( zer_opaq, new_main_exit ); |
949 register_new_node( zer_cmp , new_main_exit ); | 949 register_new_node( zer_cmp , new_main_exit ); |
950 register_new_node( zer_bol , new_main_exit ); | 950 register_new_node( zer_bol , new_main_exit ); |
951 | 951 |
952 // Build the IfNode | 952 // Build the IfNode |
953 IfNode *zer_iff = new (C, 2) IfNode( new_main_exit, zer_bol, PROB_FAIR, COUNT_UNKNOWN ); | 953 IfNode *zer_iff = new (C) IfNode( new_main_exit, zer_bol, PROB_FAIR, COUNT_UNKNOWN ); |
954 _igvn.register_new_node_with_optimizer( zer_iff ); | 954 _igvn.register_new_node_with_optimizer( zer_iff ); |
955 set_idom(zer_iff, new_main_exit, dd_main_exit); | 955 set_idom(zer_iff, new_main_exit, dd_main_exit); |
956 set_loop(zer_iff, loop->_parent); | 956 set_loop(zer_iff, loop->_parent); |
957 | 957 |
958 // Plug in the false-path, taken if we need to skip post-loop | 958 // Plug in the false-path, taken if we need to skip post-loop |
959 _igvn.replace_input_of(main_exit, 0, zer_iff); | 959 _igvn.replace_input_of(main_exit, 0, zer_iff); |
960 set_idom(main_exit, zer_iff, dd_main_exit); | 960 set_idom(main_exit, zer_iff, dd_main_exit); |
961 set_idom(main_exit->unique_out(), zer_iff, dd_main_exit); | 961 set_idom(main_exit->unique_out(), zer_iff, dd_main_exit); |
962 // Make the true-path, must enter the post loop | 962 // Make the true-path, must enter the post loop |
963 Node *zer_taken = new (C, 1) IfTrueNode( zer_iff ); | 963 Node *zer_taken = new (C) IfTrueNode( zer_iff ); |
964 _igvn.register_new_node_with_optimizer( zer_taken ); | 964 _igvn.register_new_node_with_optimizer( zer_taken ); |
965 set_idom(zer_taken, zer_iff, dd_main_exit); | 965 set_idom(zer_taken, zer_iff, dd_main_exit); |
966 set_loop(zer_taken, loop->_parent); | 966 set_loop(zer_taken, loop->_parent); |
967 // Plug in the true path | 967 // Plug in the true path |
968 _igvn.hash_delete( post_head ); | 968 _igvn.hash_delete( post_head ); |
1006 pre_end->_prob = PROB_FAIR; | 1006 pre_end->_prob = PROB_FAIR; |
1007 | 1007 |
1008 // Find the pre-loop normal exit. | 1008 // Find the pre-loop normal exit. |
1009 Node* pre_exit = pre_end->proj_out(false); | 1009 Node* pre_exit = pre_end->proj_out(false); |
1010 assert( pre_exit->Opcode() == Op_IfFalse, "" ); | 1010 assert( pre_exit->Opcode() == Op_IfFalse, "" ); |
1011 IfFalseNode *new_pre_exit = new (C, 1) IfFalseNode(pre_end); | 1011 IfFalseNode *new_pre_exit = new (C) IfFalseNode(pre_end); |
1012 _igvn.register_new_node_with_optimizer( new_pre_exit ); | 1012 _igvn.register_new_node_with_optimizer( new_pre_exit ); |
1013 set_idom(new_pre_exit, pre_end, dd_main_head); | 1013 set_idom(new_pre_exit, pre_end, dd_main_head); |
1014 set_loop(new_pre_exit, loop->_parent); | 1014 set_loop(new_pre_exit, loop->_parent); |
1015 | 1015 |
1016 // Step B2: Build a zero-trip guard for the main-loop. After leaving the | 1016 // Step B2: Build a zero-trip guard for the main-loop. After leaving the |
1017 // pre-loop, the main-loop may not execute at all. Later in life this | 1017 // pre-loop, the main-loop may not execute at all. Later in life this |
1018 // zero-trip guard will become the minimum-trip guard when we unroll | 1018 // zero-trip guard will become the minimum-trip guard when we unroll |
1019 // the main-loop. | 1019 // the main-loop. |
1020 Node *min_opaq = new (C, 2) Opaque1Node(C, limit); | 1020 Node *min_opaq = new (C) Opaque1Node(C, limit); |
1021 Node *min_cmp = new (C, 3) CmpINode( pre_incr, min_opaq ); | 1021 Node *min_cmp = new (C) CmpINode( pre_incr, min_opaq ); |
1022 Node *min_bol = new (C, 2) BoolNode( min_cmp, b_test ); | 1022 Node *min_bol = new (C) BoolNode( min_cmp, b_test ); |
1023 register_new_node( min_opaq, new_pre_exit ); | 1023 register_new_node( min_opaq, new_pre_exit ); |
1024 register_new_node( min_cmp , new_pre_exit ); | 1024 register_new_node( min_cmp , new_pre_exit ); |
1025 register_new_node( min_bol , new_pre_exit ); | 1025 register_new_node( min_bol , new_pre_exit ); |
1026 | 1026 |
1027 // Build the IfNode (assume the main-loop is executed always). | 1027 // Build the IfNode (assume the main-loop is executed always). |
1028 IfNode *min_iff = new (C, 2) IfNode( new_pre_exit, min_bol, PROB_ALWAYS, COUNT_UNKNOWN ); | 1028 IfNode *min_iff = new (C) IfNode( new_pre_exit, min_bol, PROB_ALWAYS, COUNT_UNKNOWN ); |
1029 _igvn.register_new_node_with_optimizer( min_iff ); | 1029 _igvn.register_new_node_with_optimizer( min_iff ); |
1030 set_idom(min_iff, new_pre_exit, dd_main_head); | 1030 set_idom(min_iff, new_pre_exit, dd_main_head); |
1031 set_loop(min_iff, loop->_parent); | 1031 set_loop(min_iff, loop->_parent); |
1032 | 1032 |
1033 // Plug in the false-path, taken if we need to skip main-loop | 1033 // Plug in the false-path, taken if we need to skip main-loop |
1034 _igvn.hash_delete( pre_exit ); | 1034 _igvn.hash_delete( pre_exit ); |
1035 pre_exit->set_req(0, min_iff); | 1035 pre_exit->set_req(0, min_iff); |
1036 set_idom(pre_exit, min_iff, dd_main_head); | 1036 set_idom(pre_exit, min_iff, dd_main_head); |
1037 set_idom(pre_exit->unique_out(), min_iff, dd_main_head); | 1037 set_idom(pre_exit->unique_out(), min_iff, dd_main_head); |
1038 // Make the true-path, must enter the main loop | 1038 // Make the true-path, must enter the main loop |
1039 Node *min_taken = new (C, 1) IfTrueNode( min_iff ); | 1039 Node *min_taken = new (C) IfTrueNode( min_iff ); |
1040 _igvn.register_new_node_with_optimizer( min_taken ); | 1040 _igvn.register_new_node_with_optimizer( min_taken ); |
1041 set_idom(min_taken, min_iff, dd_main_head); | 1041 set_idom(min_taken, min_iff, dd_main_head); |
1042 set_loop(min_taken, loop->_parent); | 1042 set_loop(min_taken, loop->_parent); |
1043 // Plug in the true path | 1043 // Plug in the true path |
1044 _igvn.hash_delete( main_head ); | 1044 _igvn.hash_delete( main_head ); |
1064 | 1064 |
1065 // Step B4: Shorten the pre-loop to run only 1 iteration (for now). | 1065 // Step B4: Shorten the pre-loop to run only 1 iteration (for now). |
1066 // RCE and alignment may change this later. | 1066 // RCE and alignment may change this later. |
1067 Node *cmp_end = pre_end->cmp_node(); | 1067 Node *cmp_end = pre_end->cmp_node(); |
1068 assert( cmp_end->in(2) == limit, "" ); | 1068 assert( cmp_end->in(2) == limit, "" ); |
1069 Node *pre_limit = new (C, 3) AddINode( init, stride ); | 1069 Node *pre_limit = new (C) AddINode( init, stride ); |
1070 | 1070 |
1071 // Save the original loop limit in this Opaque1 node for | 1071 // Save the original loop limit in this Opaque1 node for |
1072 // use by range check elimination. | 1072 // use by range check elimination. |
1073 Node *pre_opaq = new (C, 3) Opaque1Node(C, pre_limit, limit); | 1073 Node *pre_opaq = new (C) Opaque1Node(C, pre_limit, limit); |
1074 | 1074 |
1075 register_new_node( pre_limit, pre_head->in(0) ); | 1075 register_new_node( pre_limit, pre_head->in(0) ); |
1076 register_new_node( pre_opaq , pre_head->in(0) ); | 1076 register_new_node( pre_opaq , pre_head->in(0) ); |
1077 | 1077 |
1078 // Since no other users of pre-loop compare, I can hack limit directly | 1078 // Since no other users of pre-loop compare, I can hack limit directly |
1093 if (pre_end->in(CountedLoopEndNode::TestValue)->as_Bool()->_test._test == BoolTest::ne) { | 1093 if (pre_end->in(CountedLoopEndNode::TestValue)->as_Bool()->_test._test == BoolTest::ne) { |
1094 | 1094 |
1095 BoolTest::mask new_test = (main_end->stride_con() > 0) ? BoolTest::lt : BoolTest::gt; | 1095 BoolTest::mask new_test = (main_end->stride_con() > 0) ? BoolTest::lt : BoolTest::gt; |
1096 // Modify pre loop end condition | 1096 // Modify pre loop end condition |
1097 Node* pre_bol = pre_end->in(CountedLoopEndNode::TestValue)->as_Bool(); | 1097 Node* pre_bol = pre_end->in(CountedLoopEndNode::TestValue)->as_Bool(); |
1098 BoolNode* new_bol0 = new (C, 2) BoolNode(pre_bol->in(1), new_test); | 1098 BoolNode* new_bol0 = new (C) BoolNode(pre_bol->in(1), new_test); |
1099 register_new_node( new_bol0, pre_head->in(0) ); | 1099 register_new_node( new_bol0, pre_head->in(0) ); |
1100 _igvn.hash_delete(pre_end); | 1100 _igvn.hash_delete(pre_end); |
1101 pre_end->set_req(CountedLoopEndNode::TestValue, new_bol0); | 1101 pre_end->set_req(CountedLoopEndNode::TestValue, new_bol0); |
1102 // Modify main loop guard condition | 1102 // Modify main loop guard condition |
1103 assert(min_iff->in(CountedLoopEndNode::TestValue) == min_bol, "guard okay"); | 1103 assert(min_iff->in(CountedLoopEndNode::TestValue) == min_bol, "guard okay"); |
1104 BoolNode* new_bol1 = new (C, 2) BoolNode(min_bol->in(1), new_test); | 1104 BoolNode* new_bol1 = new (C) BoolNode(min_bol->in(1), new_test); |
1105 register_new_node( new_bol1, new_pre_exit ); | 1105 register_new_node( new_bol1, new_pre_exit ); |
1106 _igvn.hash_delete(min_iff); | 1106 _igvn.hash_delete(min_iff); |
1107 min_iff->set_req(CountedLoopEndNode::TestValue, new_bol1); | 1107 min_iff->set_req(CountedLoopEndNode::TestValue, new_bol1); |
1108 // Modify main loop end condition | 1108 // Modify main loop end condition |
1109 BoolNode* main_bol = main_end->in(CountedLoopEndNode::TestValue)->as_Bool(); | 1109 BoolNode* main_bol = main_end->in(CountedLoopEndNode::TestValue)->as_Bool(); |
1110 BoolNode* new_bol2 = new (C, 2) BoolNode(main_bol->in(1), new_test); | 1110 BoolNode* new_bol2 = new (C) BoolNode(main_bol->in(1), new_test); |
1111 register_new_node( new_bol2, main_end->in(CountedLoopEndNode::TestControl) ); | 1111 register_new_node( new_bol2, main_end->in(CountedLoopEndNode::TestControl) ); |
1112 _igvn.hash_delete(main_end); | 1112 _igvn.hash_delete(main_end); |
1113 main_end->set_req(CountedLoopEndNode::TestValue, new_bol2); | 1113 main_end->set_req(CountedLoopEndNode::TestValue, new_bol2); |
1114 } | 1114 } |
1115 | 1115 |
1210 "odd trip count for maximally unroll"); | 1210 "odd trip count for maximally unroll"); |
1211 // Don't need to adjust limit for maximally unroll since trip count is even. | 1211 // Don't need to adjust limit for maximally unroll since trip count is even. |
1212 } else if (loop_head->has_exact_trip_count() && init->is_Con()) { | 1212 } else if (loop_head->has_exact_trip_count() && init->is_Con()) { |
1213 // Loop's limit is constant. Loop's init could be constant when pre-loop | 1213 // Loop's limit is constant. Loop's init could be constant when pre-loop |
1214 // become peeled iteration. | 1214 // become peeled iteration. |
1215 long init_con = init->get_int(); | 1215 jlong init_con = init->get_int(); |
1216 // We can keep old loop limit if iterations count stays the same: | 1216 // We can keep old loop limit if iterations count stays the same: |
1217 // old_trip_count == new_trip_count * 2 | 1217 // old_trip_count == new_trip_count * 2 |
1218 // Note: since old_trip_count >= 2 then new_trip_count >= 1 | 1218 // Note: since old_trip_count >= 2 then new_trip_count >= 1 |
1219 // so we also don't need to adjust zero trip test. | 1219 // so we also don't need to adjust zero trip test. |
1220 long limit_con = limit->get_int(); | 1220 jlong limit_con = limit->get_int(); |
1221 // (stride_con*2) not overflow since stride_con <= 8. | 1221 // (stride_con*2) not overflow since stride_con <= 8. |
1222 int new_stride_con = stride_con * 2; | 1222 int new_stride_con = stride_con * 2; |
1223 int stride_m = new_stride_con - (stride_con > 0 ? 1 : -1); | 1223 int stride_m = new_stride_con - (stride_con > 0 ? 1 : -1); |
1224 long trip_count = (limit_con - init_con + stride_m)/new_stride_con; | 1224 jlong trip_count = (limit_con - init_con + stride_m)/new_stride_con; |
1225 // New trip count should satisfy next conditions. | 1225 // New trip count should satisfy next conditions. |
1226 assert(trip_count > 0 && (julong)trip_count < (julong)max_juint/2, "sanity"); | 1226 assert(trip_count > 0 && (julong)trip_count < (julong)max_juint/2, "sanity"); |
1227 uint new_trip_count = (uint)trip_count; | 1227 uint new_trip_count = (uint)trip_count; |
1228 adjust_min_trip = (old_trip_count != new_trip_count*2); | 1228 adjust_min_trip = (old_trip_count != new_trip_count*2); |
1229 } | 1229 } |
1255 // Otherwise reorg_offsets() optimization will create a separate | 1255 // Otherwise reorg_offsets() optimization will create a separate |
1256 // Opaque node for each use of trip-counter and as result | 1256 // Opaque node for each use of trip-counter and as result |
1257 // zero trip guard limit will be different from loop limit. | 1257 // zero trip guard limit will be different from loop limit. |
1258 assert(has_ctrl(opaq), "should have it"); | 1258 assert(has_ctrl(opaq), "should have it"); |
1259 Node* opaq_ctrl = get_ctrl(opaq); | 1259 Node* opaq_ctrl = get_ctrl(opaq); |
1260 limit = new (C, 2) Opaque2Node( C, limit ); | 1260 limit = new (C) Opaque2Node( C, limit ); |
1261 register_new_node( limit, opaq_ctrl ); | 1261 register_new_node( limit, opaq_ctrl ); |
1262 } | 1262 } |
1263 if (stride_con > 0 && ((limit_type->_lo - stride_con) < limit_type->_lo) || | 1263 if (stride_con > 0 && ((limit_type->_lo - stride_con) < limit_type->_lo) || |
1264 stride_con < 0 && ((limit_type->_hi - stride_con) > limit_type->_hi)) { | 1264 stride_con < 0 && ((limit_type->_hi - stride_con) > limit_type->_hi)) { |
1265 // No underflow. | 1265 // No underflow. |
1266 new_limit = new (C, 3) SubINode(limit, stride); | 1266 new_limit = new (C) SubINode(limit, stride); |
1267 } else { | 1267 } else { |
1268 // (limit - stride) may underflow. | 1268 // (limit - stride) may underflow. |
1269 // Clamp the adjustment value with MININT or MAXINT: | 1269 // Clamp the adjustment value with MININT or MAXINT: |
1270 // | 1270 // |
1271 // new_limit = limit-stride | 1271 // new_limit = limit-stride |
1291 // Optimize the limit to avoid nested CMove: | 1291 // Optimize the limit to avoid nested CMove: |
1292 // use original limit as old limit. | 1292 // use original limit as old limit. |
1293 old_limit = bol->in(1)->in(1); | 1293 old_limit = bol->in(1)->in(1); |
1294 // Adjust previous adjusted limit. | 1294 // Adjust previous adjusted limit. |
1295 adj_limit = limit->in(CMoveNode::IfFalse); | 1295 adj_limit = limit->in(CMoveNode::IfFalse); |
1296 adj_limit = new (C, 3) SubINode(adj_limit, stride); | 1296 adj_limit = new (C) SubINode(adj_limit, stride); |
1297 } else { | 1297 } else { |
1298 old_limit = limit; | 1298 old_limit = limit; |
1299 adj_limit = new (C, 3) SubINode(limit, stride); | 1299 adj_limit = new (C) SubINode(limit, stride); |
1300 } | 1300 } |
1301 assert(old_limit != NULL && adj_limit != NULL, ""); | 1301 assert(old_limit != NULL && adj_limit != NULL, ""); |
1302 register_new_node( adj_limit, ctrl ); // adjust amount | 1302 register_new_node( adj_limit, ctrl ); // adjust amount |
1303 Node* adj_cmp = new (C, 3) CmpINode(old_limit, adj_limit); | 1303 Node* adj_cmp = new (C) CmpINode(old_limit, adj_limit); |
1304 register_new_node( adj_cmp, ctrl ); | 1304 register_new_node( adj_cmp, ctrl ); |
1305 Node* adj_bool = new (C, 2) BoolNode(adj_cmp, bt); | 1305 Node* adj_bool = new (C) BoolNode(adj_cmp, bt); |
1306 register_new_node( adj_bool, ctrl ); | 1306 register_new_node( adj_bool, ctrl ); |
1307 new_limit = new (C, 4) CMoveINode(adj_bool, adj_limit, adj_max, TypeInt::INT); | 1307 new_limit = new (C) CMoveINode(adj_bool, adj_limit, adj_max, TypeInt::INT); |
1308 } | 1308 } |
1309 register_new_node(new_limit, ctrl); | 1309 register_new_node(new_limit, ctrl); |
1310 } | 1310 } |
1311 assert(new_limit != NULL, ""); | 1311 assert(new_limit != NULL, ""); |
1312 // Replace in loop test. | 1312 // Replace in loop test. |
1364 // Step 2: Cut back the trip counter for an unroll amount of 2. | 1364 // Step 2: Cut back the trip counter for an unroll amount of 2. |
1365 // Loop will normally trip (limit - init)/stride_con. Since it's a | 1365 // Loop will normally trip (limit - init)/stride_con. Since it's a |
1366 // CountedLoop this is exact (stride divides limit-init exactly). | 1366 // CountedLoop this is exact (stride divides limit-init exactly). |
1367 // We are going to double the loop body, so we want to knock off any | 1367 // We are going to double the loop body, so we want to knock off any |
1368 // odd iteration: (trip_cnt & ~1). Then back compute a new limit. | 1368 // odd iteration: (trip_cnt & ~1). Then back compute a new limit. |
1369 Node *span = new (C, 3) SubINode( limit, init ); | 1369 Node *span = new (C) SubINode( limit, init ); |
1370 register_new_node( span, ctrl ); | 1370 register_new_node( span, ctrl ); |
1371 Node *trip = new (C, 3) DivINode( 0, span, stride ); | 1371 Node *trip = new (C) DivINode( 0, span, stride ); |
1372 register_new_node( trip, ctrl ); | 1372 register_new_node( trip, ctrl ); |
1373 Node *mtwo = _igvn.intcon(-2); | 1373 Node *mtwo = _igvn.intcon(-2); |
1374 set_ctrl(mtwo, C->root()); | 1374 set_ctrl(mtwo, C->root()); |
1375 Node *rond = new (C, 3) AndINode( trip, mtwo ); | 1375 Node *rond = new (C) AndINode( trip, mtwo ); |
1376 register_new_node( rond, ctrl ); | 1376 register_new_node( rond, ctrl ); |
1377 Node *spn2 = new (C, 3) MulINode( rond, stride ); | 1377 Node *spn2 = new (C) MulINode( rond, stride ); |
1378 register_new_node( spn2, ctrl ); | 1378 register_new_node( spn2, ctrl ); |
1379 new_limit = new (C, 3) AddINode( spn2, init ); | 1379 new_limit = new (C) AddINode( spn2, init ); |
1380 register_new_node( new_limit, ctrl ); | 1380 register_new_node( new_limit, ctrl ); |
1381 | 1381 |
1382 // Hammer in the new limit | 1382 // Hammer in the new limit |
1383 Node *ctrl2 = loop_end->in(0); | 1383 Node *ctrl2 = loop_end->in(0); |
1384 Node *cmp2 = new (C, 3) CmpINode( loop_head->incr(), new_limit ); | 1384 Node *cmp2 = new (C) CmpINode( loop_head->incr(), new_limit ); |
1385 register_new_node( cmp2, ctrl2 ); | 1385 register_new_node( cmp2, ctrl2 ); |
1386 Node *bol2 = new (C, 2) BoolNode( cmp2, loop_end->test_trip() ); | 1386 Node *bol2 = new (C) BoolNode( cmp2, loop_end->test_trip() ); |
1387 register_new_node( bol2, ctrl2 ); | 1387 register_new_node( bol2, ctrl2 ); |
1388 _igvn.hash_delete(loop_end); | 1388 _igvn.hash_delete(loop_end); |
1389 loop_end->set_req(CountedLoopEndNode::TestValue, bol2); | 1389 loop_end->set_req(CountedLoopEndNode::TestValue, bol2); |
1390 | 1390 |
1391 // Step 3: Find the min-trip test guaranteed before a 'main' loop. | 1391 // Step 3: Find the min-trip test guaranteed before a 'main' loop. |
1487 | 1487 |
1488 //------------------------------adjust_limit----------------------------------- | 1488 //------------------------------adjust_limit----------------------------------- |
1489 // Helper function for add_constraint(). | 1489 // Helper function for add_constraint(). |
1490 Node* PhaseIdealLoop::adjust_limit(int stride_con, Node * scale, Node *offset, Node *rc_limit, Node *loop_limit, Node *pre_ctrl) { | 1490 Node* PhaseIdealLoop::adjust_limit(int stride_con, Node * scale, Node *offset, Node *rc_limit, Node *loop_limit, Node *pre_ctrl) { |
1491 // Compute "I :: (limit-offset)/scale" | 1491 // Compute "I :: (limit-offset)/scale" |
1492 Node *con = new (C, 3) SubINode(rc_limit, offset); | 1492 Node *con = new (C) SubINode(rc_limit, offset); |
1493 register_new_node(con, pre_ctrl); | 1493 register_new_node(con, pre_ctrl); |
1494 Node *X = new (C, 3) DivINode(0, con, scale); | 1494 Node *X = new (C) DivINode(0, con, scale); |
1495 register_new_node(X, pre_ctrl); | 1495 register_new_node(X, pre_ctrl); |
1496 | 1496 |
1497 // Adjust loop limit | 1497 // Adjust loop limit |
1498 loop_limit = (stride_con > 0) | 1498 loop_limit = (stride_con > 0) |
1499 ? (Node*)(new (C, 3) MinINode(loop_limit, X)) | 1499 ? (Node*)(new (C) MinINode(loop_limit, X)) |
1500 : (Node*)(new (C, 3) MaxINode(loop_limit, X)); | 1500 : (Node*)(new (C) MaxINode(loop_limit, X)); |
1501 register_new_node(loop_limit, pre_ctrl); | 1501 register_new_node(loop_limit, pre_ctrl); |
1502 return loop_limit; | 1502 return loop_limit; |
1503 } | 1503 } |
1504 | 1504 |
1505 //------------------------------add_constraint--------------------------------- | 1505 //------------------------------add_constraint--------------------------------- |
1556 // | 1556 // |
1557 // Also (min_int+1 == -max_int) is used instead of min_int here | 1557 // Also (min_int+1 == -max_int) is used instead of min_int here |
1558 // to avoid problem with scale == -1 (min_int/(-1) == min_int). | 1558 // to avoid problem with scale == -1 (min_int/(-1) == min_int). |
1559 Node* shift = _igvn.intcon(31); | 1559 Node* shift = _igvn.intcon(31); |
1560 set_ctrl(shift, C->root()); | 1560 set_ctrl(shift, C->root()); |
1561 Node* sign = new (C, 3) RShiftINode(offset, shift); | 1561 Node* sign = new (C) RShiftINode(offset, shift); |
1562 register_new_node(sign, pre_ctrl); | 1562 register_new_node(sign, pre_ctrl); |
1563 offset = new (C, 3) AndINode(offset, sign); | 1563 offset = new (C) AndINode(offset, sign); |
1564 register_new_node(offset, pre_ctrl); | 1564 register_new_node(offset, pre_ctrl); |
1565 } else { | 1565 } else { |
1566 assert(low_limit->get_int() == 0, "wrong low limit for range check"); | 1566 assert(low_limit->get_int() == 0, "wrong low limit for range check"); |
1567 // The only problem we have here when offset == min_int | 1567 // The only problem we have here when offset == min_int |
1568 // since (0-min_int) == min_int. It may be fine for stride > 0 | 1568 // since (0-min_int) == min_int. It may be fine for stride > 0 |
1591 // To avoid it min(pre_limit, original_limit) is used | 1591 // To avoid it min(pre_limit, original_limit) is used |
1592 // in do_range_check() for stride > 0 and max() for < 0. | 1592 // in do_range_check() for stride > 0 and max() for < 0. |
1593 Node *one = _igvn.intcon(1); | 1593 Node *one = _igvn.intcon(1); |
1594 set_ctrl(one, C->root()); | 1594 set_ctrl(one, C->root()); |
1595 | 1595 |
1596 Node *plus_one = new (C, 3) AddINode(offset, one); | 1596 Node *plus_one = new (C) AddINode(offset, one); |
1597 register_new_node( plus_one, pre_ctrl ); | 1597 register_new_node( plus_one, pre_ctrl ); |
1598 // Pass (-stride) to indicate pre_loop_cond = NOT(main_loop_cond); | 1598 // Pass (-stride) to indicate pre_loop_cond = NOT(main_loop_cond); |
1599 *pre_limit = adjust_limit((-stride_con), scale, plus_one, upper_limit, *pre_limit, pre_ctrl); | 1599 *pre_limit = adjust_limit((-stride_con), scale, plus_one, upper_limit, *pre_limit, pre_ctrl); |
1600 | 1600 |
1601 if (low_limit->get_int() == -max_jint) { | 1601 if (low_limit->get_int() == -max_jint) { |
1609 // | 1609 // |
1610 // Also (min_int+1 == -max_int) is used instead of min_int here | 1610 // Also (min_int+1 == -max_int) is used instead of min_int here |
1611 // to avoid problem with scale == -1 (min_int/(-1) == min_int). | 1611 // to avoid problem with scale == -1 (min_int/(-1) == min_int). |
1612 Node* shift = _igvn.intcon(31); | 1612 Node* shift = _igvn.intcon(31); |
1613 set_ctrl(shift, C->root()); | 1613 set_ctrl(shift, C->root()); |
1614 Node* sign = new (C, 3) RShiftINode(plus_one, shift); | 1614 Node* sign = new (C) RShiftINode(plus_one, shift); |
1615 register_new_node(sign, pre_ctrl); | 1615 register_new_node(sign, pre_ctrl); |
1616 plus_one = new (C, 3) AndINode(plus_one, sign); | 1616 plus_one = new (C) AndINode(plus_one, sign); |
1617 register_new_node(plus_one, pre_ctrl); | 1617 register_new_node(plus_one, pre_ctrl); |
1618 } else { | 1618 } else { |
1619 assert(low_limit->get_int() == 0, "wrong low limit for range check"); | 1619 assert(low_limit->get_int() == 0, "wrong low limit for range check"); |
1620 // The only problem we have here when offset == max_int | 1620 // The only problem we have here when offset == max_int |
1621 // since (max_int+1) == min_int and (0-min_int) == min_int. | 1621 // since (max_int+1) == min_int and (0-min_int) == min_int. |
1694 if (depth < 2 && | 1694 if (depth < 2 && |
1695 is_scaled_iv_plus_offset(exp->in(1), iv, p_scale, | 1695 is_scaled_iv_plus_offset(exp->in(1), iv, p_scale, |
1696 p_offset != NULL ? &offset2 : NULL, depth+1)) { | 1696 p_offset != NULL ? &offset2 : NULL, depth+1)) { |
1697 if (p_offset != NULL) { | 1697 if (p_offset != NULL) { |
1698 Node *ctrl_off2 = get_ctrl(offset2); | 1698 Node *ctrl_off2 = get_ctrl(offset2); |
1699 Node* offset = new (C, 3) AddINode(offset2, exp->in(2)); | 1699 Node* offset = new (C) AddINode(offset2, exp->in(2)); |
1700 register_new_node(offset, ctrl_off2); | 1700 register_new_node(offset, ctrl_off2); |
1701 *p_offset = offset; | 1701 *p_offset = offset; |
1702 } | 1702 } |
1703 return true; | 1703 return true; |
1704 } | 1704 } |
1707 if (is_scaled_iv(exp->in(1), iv, p_scale)) { | 1707 if (is_scaled_iv(exp->in(1), iv, p_scale)) { |
1708 if (p_offset != NULL) { | 1708 if (p_offset != NULL) { |
1709 Node *zero = _igvn.intcon(0); | 1709 Node *zero = _igvn.intcon(0); |
1710 set_ctrl(zero, C->root()); | 1710 set_ctrl(zero, C->root()); |
1711 Node *ctrl_off = get_ctrl(exp->in(2)); | 1711 Node *ctrl_off = get_ctrl(exp->in(2)); |
1712 Node* offset = new (C, 3) SubINode(zero, exp->in(2)); | 1712 Node* offset = new (C) SubINode(zero, exp->in(2)); |
1713 register_new_node(offset, ctrl_off); | 1713 register_new_node(offset, ctrl_off); |
1714 *p_offset = offset; | 1714 *p_offset = offset; |
1715 } | 1715 } |
1716 return true; | 1716 return true; |
1717 } | 1717 } |
1910 case BoolTest::gt: | 1910 case BoolTest::gt: |
1911 // Fall into GE case | 1911 // Fall into GE case |
1912 case BoolTest::ge: | 1912 case BoolTest::ge: |
1913 // Convert (I*scale+offset) >= Limit to (I*(-scale)+(-offset)) <= -Limit | 1913 // Convert (I*scale+offset) >= Limit to (I*(-scale)+(-offset)) <= -Limit |
1914 scale_con = -scale_con; | 1914 scale_con = -scale_con; |
1915 offset = new (C, 3) SubINode( zero, offset ); | 1915 offset = new (C) SubINode( zero, offset ); |
1916 register_new_node( offset, pre_ctrl ); | 1916 register_new_node( offset, pre_ctrl ); |
1917 limit = new (C, 3) SubINode( zero, limit ); | 1917 limit = new (C) SubINode( zero, limit ); |
1918 register_new_node( limit, pre_ctrl ); | 1918 register_new_node( limit, pre_ctrl ); |
1919 // Fall into LE case | 1919 // Fall into LE case |
1920 case BoolTest::le: | 1920 case BoolTest::le: |
1921 if (b_test._test != BoolTest::gt) { | 1921 if (b_test._test != BoolTest::gt) { |
1922 // Convert X <= Y to X < Y+1 | 1922 // Convert X <= Y to X < Y+1 |
1923 limit = new (C, 3) AddINode( limit, one ); | 1923 limit = new (C) AddINode( limit, one ); |
1924 register_new_node( limit, pre_ctrl ); | 1924 register_new_node( limit, pre_ctrl ); |
1925 } | 1925 } |
1926 // Fall into LT case | 1926 // Fall into LT case |
1927 case BoolTest::lt: | 1927 case BoolTest::lt: |
1928 // The underflow and overflow limits: MIN_INT <= scale*I+offset < limit | 1928 // The underflow and overflow limits: MIN_INT <= scale*I+offset < limit |
1969 | 1969 |
1970 } | 1970 } |
1971 | 1971 |
1972 // Update loop limits | 1972 // Update loop limits |
1973 if (conditional_rc) { | 1973 if (conditional_rc) { |
1974 pre_limit = (stride_con > 0) ? (Node*)new (C,3) MinINode(pre_limit, orig_limit) | 1974 pre_limit = (stride_con > 0) ? (Node*)new (C) MinINode(pre_limit, orig_limit) |
1975 : (Node*)new (C,3) MaxINode(pre_limit, orig_limit); | 1975 : (Node*)new (C) MaxINode(pre_limit, orig_limit); |
1976 register_new_node(pre_limit, pre_ctrl); | 1976 register_new_node(pre_limit, pre_ctrl); |
1977 } | 1977 } |
1978 _igvn.hash_delete(pre_opaq); | 1978 _igvn.hash_delete(pre_opaq); |
1979 pre_opaq->set_req(1, pre_limit); | 1979 pre_opaq->set_req(1, pre_limit); |
1980 | 1980 |
1985 // "Standard" round-up logic: ([main_limit-init+(y-1)]/y)*y+init | 1985 // "Standard" round-up logic: ([main_limit-init+(y-1)]/y)*y+init |
1986 // Hopefully, compiler will optimize for powers of 2. | 1986 // Hopefully, compiler will optimize for powers of 2. |
1987 Node *ctrl = get_ctrl(main_limit); | 1987 Node *ctrl = get_ctrl(main_limit); |
1988 Node *stride = cl->stride(); | 1988 Node *stride = cl->stride(); |
1989 Node *init = cl->init_trip(); | 1989 Node *init = cl->init_trip(); |
1990 Node *span = new (C, 3) SubINode(main_limit,init); | 1990 Node *span = new (C) SubINode(main_limit,init); |
1991 register_new_node(span,ctrl); | 1991 register_new_node(span,ctrl); |
1992 Node *rndup = _igvn.intcon(stride_con + ((stride_con>0)?-1:1)); | 1992 Node *rndup = _igvn.intcon(stride_con + ((stride_con>0)?-1:1)); |
1993 Node *add = new (C, 3) AddINode(span,rndup); | 1993 Node *add = new (C) AddINode(span,rndup); |
1994 register_new_node(add,ctrl); | 1994 register_new_node(add,ctrl); |
1995 Node *div = new (C, 3) DivINode(0,add,stride); | 1995 Node *div = new (C) DivINode(0,add,stride); |
1996 register_new_node(div,ctrl); | 1996 register_new_node(div,ctrl); |
1997 Node *mul = new (C, 3) MulINode(div,stride); | 1997 Node *mul = new (C) MulINode(div,stride); |
1998 register_new_node(mul,ctrl); | 1998 register_new_node(mul,ctrl); |
1999 Node *newlim = new (C, 3) AddINode(mul,init); | 1999 Node *newlim = new (C) AddINode(mul,init); |
2000 register_new_node(newlim,ctrl); | 2000 register_new_node(newlim,ctrl); |
2001 main_limit = newlim; | 2001 main_limit = newlim; |
2002 } | 2002 } |
2003 | 2003 |
2004 Node *main_cle = cl->loopexit(); | 2004 Node *main_cle = cl->loopexit(); |
2165 phase->_igvn._worklist.push(cmp->in(2)); // put limit on worklist | 2165 phase->_igvn._worklist.push(cmp->in(2)); // put limit on worklist |
2166 phase->_igvn.replace_input_of(cmp, 2, exact_limit); // put cmp on worklist | 2166 phase->_igvn.replace_input_of(cmp, 2, exact_limit); // put cmp on worklist |
2167 } | 2167 } |
2168 // Note: the final value after increment should not overflow since | 2168 // Note: the final value after increment should not overflow since |
2169 // counted loop has limit check predicate. | 2169 // counted loop has limit check predicate. |
2170 Node *final = new (phase->C, 3) SubINode( exact_limit, cl->stride() ); | 2170 Node *final = new (phase->C) SubINode( exact_limit, cl->stride() ); |
2171 phase->register_new_node(final,cl->in(LoopNode::EntryControl)); | 2171 phase->register_new_node(final,cl->in(LoopNode::EntryControl)); |
2172 phase->_igvn.replace_node(phi,final); | 2172 phase->_igvn.replace_node(phi,final); |
2173 phase->C->set_major_progress(); | 2173 phase->C->set_major_progress(); |
2174 return true; | 2174 return true; |
2175 } | 2175 } |
2411 if (store != NULL) { | 2411 if (store != NULL) { |
2412 msg = "multiple stores"; | 2412 msg = "multiple stores"; |
2413 break; | 2413 break; |
2414 } | 2414 } |
2415 int opc = n->Opcode(); | 2415 int opc = n->Opcode(); |
2416 if (opc == Op_StoreP || opc == Op_StoreN || opc == Op_StoreCM) { | 2416 if (opc == Op_StoreP || opc == Op_StoreN || opc == Op_StoreNKlass || opc == Op_StoreCM) { |
2417 msg = "oop fills not handled"; | 2417 msg = "oop fills not handled"; |
2418 break; | 2418 break; |
2419 } | 2419 } |
2420 Node* value = n->in(MemNode::ValueIn); | 2420 Node* value = n->in(MemNode::ValueIn); |
2421 if (!lpt->is_invariant(value)) { | 2421 if (!lpt->is_invariant(value)) { |
2649 Node* base = store->in(MemNode::Address)->as_AddP()->in(AddPNode::Base); | 2649 Node* base = store->in(MemNode::Address)->as_AddP()->in(AddPNode::Base); |
2650 | 2650 |
2651 // Build an expression for the beginning of the copy region | 2651 // Build an expression for the beginning of the copy region |
2652 Node* index = head->init_trip(); | 2652 Node* index = head->init_trip(); |
2653 #ifdef _LP64 | 2653 #ifdef _LP64 |
2654 index = new (C, 2) ConvI2LNode(index); | 2654 index = new (C) ConvI2LNode(index); |
2655 _igvn.register_new_node_with_optimizer(index); | 2655 _igvn.register_new_node_with_optimizer(index); |
2656 #endif | 2656 #endif |
2657 if (shift != NULL) { | 2657 if (shift != NULL) { |
2658 // byte arrays don't require a shift but others do. | 2658 // byte arrays don't require a shift but others do. |
2659 index = new (C, 3) LShiftXNode(index, shift->in(2)); | 2659 index = new (C) LShiftXNode(index, shift->in(2)); |
2660 _igvn.register_new_node_with_optimizer(index); | 2660 _igvn.register_new_node_with_optimizer(index); |
2661 } | 2661 } |
2662 index = new (C, 4) AddPNode(base, base, index); | 2662 index = new (C) AddPNode(base, base, index); |
2663 _igvn.register_new_node_with_optimizer(index); | 2663 _igvn.register_new_node_with_optimizer(index); |
2664 Node* from = new (C, 4) AddPNode(base, index, offset); | 2664 Node* from = new (C) AddPNode(base, index, offset); |
2665 _igvn.register_new_node_with_optimizer(from); | 2665 _igvn.register_new_node_with_optimizer(from); |
2666 // Compute the number of elements to copy | 2666 // Compute the number of elements to copy |
2667 Node* len = new (C, 3) SubINode(head->limit(), head->init_trip()); | 2667 Node* len = new (C) SubINode(head->limit(), head->init_trip()); |
2668 _igvn.register_new_node_with_optimizer(len); | 2668 _igvn.register_new_node_with_optimizer(len); |
2669 | 2669 |
2670 BasicType t = store->as_Mem()->memory_type(); | 2670 BasicType t = store->as_Mem()->memory_type(); |
2671 bool aligned = false; | 2671 bool aligned = false; |
2672 if (offset != NULL && head->init_trip()->is_Con()) { | 2672 if (offset != NULL && head->init_trip()->is_Con()) { |
2679 address fill = StubRoutines::select_fill_function(t, aligned, fill_name); | 2679 address fill = StubRoutines::select_fill_function(t, aligned, fill_name); |
2680 assert(fill != NULL, "what?"); | 2680 assert(fill != NULL, "what?"); |
2681 | 2681 |
2682 // Convert float/double to int/long for fill routines | 2682 // Convert float/double to int/long for fill routines |
2683 if (t == T_FLOAT) { | 2683 if (t == T_FLOAT) { |
2684 store_value = new (C, 2) MoveF2INode(store_value); | 2684 store_value = new (C) MoveF2INode(store_value); |
2685 _igvn.register_new_node_with_optimizer(store_value); | 2685 _igvn.register_new_node_with_optimizer(store_value); |
2686 } else if (t == T_DOUBLE) { | 2686 } else if (t == T_DOUBLE) { |
2687 store_value = new (C, 2) MoveD2LNode(store_value); | 2687 store_value = new (C) MoveD2LNode(store_value); |
2688 _igvn.register_new_node_with_optimizer(store_value); | 2688 _igvn.register_new_node_with_optimizer(store_value); |
2689 } | 2689 } |
2690 | 2690 |
2691 Node* mem_phi = store->in(MemNode::Memory); | 2691 Node* mem_phi = store->in(MemNode::Memory); |
2692 Node* result_ctrl; | 2692 Node* result_ctrl; |
2693 Node* result_mem; | 2693 Node* result_mem; |
2694 const TypeFunc* call_type = OptoRuntime::array_fill_Type(); | 2694 const TypeFunc* call_type = OptoRuntime::array_fill_Type(); |
2695 int size = call_type->domain()->cnt(); | 2695 CallLeafNode *call = new (C) CallLeafNoFPNode(call_type, fill, |
2696 CallLeafNode *call = new (C, size) CallLeafNoFPNode(call_type, fill, | 2696 fill_name, TypeAryPtr::get_array_body_type(t)); |
2697 fill_name, TypeAryPtr::get_array_body_type(t)); | |
2698 call->init_req(TypeFunc::Parms+0, from); | 2697 call->init_req(TypeFunc::Parms+0, from); |
2699 call->init_req(TypeFunc::Parms+1, store_value); | 2698 call->init_req(TypeFunc::Parms+1, store_value); |
2700 #ifdef _LP64 | 2699 #ifdef _LP64 |
2701 len = new (C, 2) ConvI2LNode(len); | 2700 len = new (C) ConvI2LNode(len); |
2702 _igvn.register_new_node_with_optimizer(len); | 2701 _igvn.register_new_node_with_optimizer(len); |
2703 #endif | 2702 #endif |
2704 call->init_req(TypeFunc::Parms+2, len); | 2703 call->init_req(TypeFunc::Parms+2, len); |
2705 #ifdef _LP64 | 2704 #ifdef _LP64 |
2706 call->init_req(TypeFunc::Parms+3, C->top()); | 2705 call->init_req(TypeFunc::Parms+3, C->top()); |
2709 call->init_req( TypeFunc::I_O , C->top() ) ; // does no i/o | 2708 call->init_req( TypeFunc::I_O , C->top() ) ; // does no i/o |
2710 call->init_req( TypeFunc::Memory , mem_phi->in(LoopNode::EntryControl) ); | 2709 call->init_req( TypeFunc::Memory , mem_phi->in(LoopNode::EntryControl) ); |
2711 call->init_req( TypeFunc::ReturnAdr, C->start()->proj_out(TypeFunc::ReturnAdr) ); | 2710 call->init_req( TypeFunc::ReturnAdr, C->start()->proj_out(TypeFunc::ReturnAdr) ); |
2712 call->init_req( TypeFunc::FramePtr, C->start()->proj_out(TypeFunc::FramePtr) ); | 2711 call->init_req( TypeFunc::FramePtr, C->start()->proj_out(TypeFunc::FramePtr) ); |
2713 _igvn.register_new_node_with_optimizer(call); | 2712 _igvn.register_new_node_with_optimizer(call); |
2714 result_ctrl = new (C, 1) ProjNode(call,TypeFunc::Control); | 2713 result_ctrl = new (C) ProjNode(call,TypeFunc::Control); |
2715 _igvn.register_new_node_with_optimizer(result_ctrl); | 2714 _igvn.register_new_node_with_optimizer(result_ctrl); |
2716 result_mem = new (C, 1) ProjNode(call,TypeFunc::Memory); | 2715 result_mem = new (C) ProjNode(call,TypeFunc::Memory); |
2717 _igvn.register_new_node_with_optimizer(result_mem); | 2716 _igvn.register_new_node_with_optimizer(result_mem); |
2718 | 2717 |
2719 /* Disable following optimization until proper fix (add missing checks). | 2718 /* Disable following optimization until proper fix (add missing checks). |
2720 | 2719 |
2721 // If this fill is tightly coupled to an allocation and overwrites | 2720 // If this fill is tightly coupled to an allocation and overwrites |