equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2017, 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. |
510 // do not need anti-dependence edges. |
510 // do not need anti-dependence edges. |
511 int load_alias_idx = C->get_alias_index(load->adr_type()); |
511 int load_alias_idx = C->get_alias_index(load->adr_type()); |
512 #ifdef ASSERT |
512 #ifdef ASSERT |
513 if (load_alias_idx == Compile::AliasIdxBot && C->AliasLevel() > 0 && |
513 if (load_alias_idx == Compile::AliasIdxBot && C->AliasLevel() > 0 && |
514 (PrintOpto || VerifyAliases || |
514 (PrintOpto || VerifyAliases || |
515 PrintMiscellaneous && (WizardMode || Verbose))) { |
515 (PrintMiscellaneous && (WizardMode || Verbose)))) { |
516 // Load nodes should not consume all of memory. |
516 // Load nodes should not consume all of memory. |
517 // Reporting a bottom type indicates a bug in adlc. |
517 // Reporting a bottom type indicates a bug in adlc. |
518 // If some particular type of node validly consumes all of memory, |
518 // If some particular type of node validly consumes all of memory, |
519 // sharpen the preceding "if" to exclude it, so we can catch bugs here. |
519 // sharpen the preceding "if" to exclude it, so we can catch bugs here. |
520 tty->print_cr("*** Possible Anti-Dependence Bug: Load consumes all of memory."); |
520 tty->print_cr("*** Possible Anti-Dependence Bug: Load consumes all of memory."); |
929 |
929 |
930 Node_Backward_Iterator iter((Node *)_root, visited, stack, *this); |
930 Node_Backward_Iterator iter((Node *)_root, visited, stack, *this); |
931 Node *n; |
931 Node *n; |
932 |
932 |
933 // Walk over all the nodes from last to first |
933 // Walk over all the nodes from last to first |
934 while (n = iter.next()) { |
934 while ((n = iter.next())) { |
935 // Set the latency for the definitions of this instruction |
935 // Set the latency for the definitions of this instruction |
936 partial_latency_of_defs(n); |
936 partial_latency_of_defs(n); |
937 } |
937 } |
938 } // end ComputeLatenciesBackwards |
938 } // end ComputeLatenciesBackwards |
939 |
939 |
1204 |
1204 |
1205 Node_Backward_Iterator iter((Node *)_root, visited, stack, *this); |
1205 Node_Backward_Iterator iter((Node *)_root, visited, stack, *this); |
1206 Node *self; |
1206 Node *self; |
1207 |
1207 |
1208 // Walk over all the nodes from last to first |
1208 // Walk over all the nodes from last to first |
1209 while (self = iter.next()) { |
1209 while ((self = iter.next())) { |
1210 Block* early = get_block_for_node(self); // Earliest legal placement |
1210 Block* early = get_block_for_node(self); // Earliest legal placement |
1211 |
1211 |
1212 if (self->is_top()) { |
1212 if (self->is_top()) { |
1213 // Top node goes in bb #2 with other constants. |
1213 // Top node goes in bb #2 with other constants. |
1214 // It must be special-cased, because it has no out edges. |
1214 // It must be special-cased, because it has no out edges. |
1232 case Op_CreateEx: |
1232 case Op_CreateEx: |
1233 // Don't move exception creation |
1233 // Don't move exception creation |
1234 early->add_inst(self); |
1234 early->add_inst(self); |
1235 continue; |
1235 continue; |
1236 break; |
1236 break; |
1237 case Op_CheckCastPP: |
1237 case Op_CheckCastPP: { |
1238 // Don't move CheckCastPP nodes away from their input, if the input |
1238 // Don't move CheckCastPP nodes away from their input, if the input |
1239 // is a rawptr (5071820). |
1239 // is a rawptr (5071820). |
1240 Node *def = self->in(1); |
1240 Node *def = self->in(1); |
1241 if (def != NULL && def->bottom_type()->base() == Type::RawPtr) { |
1241 if (def != NULL && def->bottom_type()->base() == Type::RawPtr) { |
1242 early->add_inst(self); |
1242 early->add_inst(self); |
1243 #ifdef ASSERT |
1243 #ifdef ASSERT |
1244 _raw_oops.push(def); |
1244 _raw_oops.push(def); |
1245 #endif |
1245 #endif |
1246 continue; |
1246 continue; |
1247 } |
1247 } |
|
1248 break; |
|
1249 } |
|
1250 default: |
1248 break; |
1251 break; |
1249 } |
1252 } |
1250 } |
1253 } |
1251 |
1254 |
1252 // Gather LCA of all uses |
1255 // Gather LCA of all uses |