equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 1997, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 1997, 2018, 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. |
2371 // Check for no longer being part of a loop |
2371 // Check for no longer being part of a loop |
2372 Node *NeverBranchNode::Ideal(PhaseGVN *phase, bool can_reshape) { |
2372 Node *NeverBranchNode::Ideal(PhaseGVN *phase, bool can_reshape) { |
2373 if (can_reshape && !in(0)->is_Loop()) { |
2373 if (can_reshape && !in(0)->is_Loop()) { |
2374 // Dead code elimination can sometimes delete this projection so |
2374 // Dead code elimination can sometimes delete this projection so |
2375 // if it's not there, there's nothing to do. |
2375 // if it's not there, there's nothing to do. |
2376 Node* fallthru = proj_out(0); |
2376 Node* fallthru = proj_out_or_null(0); |
2377 if (fallthru != NULL) { |
2377 if (fallthru != NULL) { |
2378 phase->is_IterGVN()->replace_node(fallthru, in(0)); |
2378 phase->is_IterGVN()->replace_node(fallthru, in(0)); |
2379 } |
2379 } |
2380 return phase->C->top(); |
2380 return phase->C->top(); |
2381 } |
2381 } |