equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2005, 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. |
3952 } |
3952 } |
3953 |
3953 |
3954 if (!processed_interval) { |
3954 if (!processed_interval) { |
3955 // no move could be processed because there is a cycle in the move list |
3955 // no move could be processed because there is a cycle in the move list |
3956 // (e.g. r1 -> r2, r2 -> r1), so one interval must be spilled to memory |
3956 // (e.g. r1 -> r2, r2 -> r1), so one interval must be spilled to memory |
3957 assert(spill_candidate != -1, "no interval in register for spilling found"); |
3957 guarantee(spill_candidate != -1, "no interval in register for spilling found"); |
3958 |
3958 |
3959 // create a new spill interval and assign a stack slot to it |
3959 // create a new spill interval and assign a stack slot to it |
3960 Interval* from_interval = _mapping_from.at(spill_candidate); |
3960 Interval* from_interval = _mapping_from.at(spill_candidate); |
3961 Interval* spill_interval = new Interval(-1); |
3961 Interval* spill_interval = new Interval(-1); |
3962 spill_interval->set_type(from_interval->type()); |
3962 spill_interval->set_type(from_interval->type()); |
6299 assert(prev_op->as_Op2() != NULL, "branch must be of type LIR_Op2"); |
6299 assert(prev_op->as_Op2() != NULL, "branch must be of type LIR_Op2"); |
6300 prev_cmp = (LIR_Op2*)prev_op; |
6300 prev_cmp = (LIR_Op2*)prev_op; |
6301 assert(prev_branch->cond() == prev_cmp->condition(), "should be the same"); |
6301 assert(prev_branch->cond() == prev_cmp->condition(), "should be the same"); |
6302 } |
6302 } |
6303 } |
6303 } |
6304 assert(prev_cmp != NULL, "should have found comp instruction for branch"); |
6304 // Guarantee because it is dereferenced below. |
|
6305 guarantee(prev_cmp != NULL, "should have found comp instruction for branch"); |
6305 if (prev_branch->block() == code->at(i + 1) && prev_branch->info() == NULL) { |
6306 if (prev_branch->block() == code->at(i + 1) && prev_branch->info() == NULL) { |
6306 |
6307 |
6307 TRACE_LINEAR_SCAN(3, tty->print_cr("Negating conditional branch and deleting unconditional branch at end of block B%d", block->block_id())); |
6308 TRACE_LINEAR_SCAN(3, tty->print_cr("Negating conditional branch and deleting unconditional branch at end of block B%d", block->block_id())); |
6308 |
6309 |
6309 // eliminate a conditional branch to the immediate successor |
6310 // eliminate a conditional branch to the immediate successor |