提交 b0407904 编写于 作者: K kvn

8066649: 8u backport for 8065618 is incorrect

Summary: The new code in 8u backport should guard the execution of the following code instead of return.
Reviewed-by: iveresov
上级 a4edb70a
...@@ -541,6 +541,7 @@ uint PhaseChaitin::build_ifg_physical( ResourceArea *a ) { ...@@ -541,6 +541,7 @@ uint PhaseChaitin::build_ifg_physical( ResourceArea *a ) {
if( !n->is_Proj() || if( !n->is_Proj() ||
// Could also be a flags-projection of a dead ADD or such. // Could also be a flags-projection of a dead ADD or such.
(_lrg_map.live_range_id(def) && !liveout.member(_lrg_map.live_range_id(def)))) { (_lrg_map.live_range_id(def) && !liveout.member(_lrg_map.live_range_id(def)))) {
bool remove = true;
if (n->is_MachProj()) { if (n->is_MachProj()) {
// Don't remove KILL projections if their "defining" nodes have // Don't remove KILL projections if their "defining" nodes have
// memory effects (have SCMemProj projection node) - // memory effects (have SCMemProj projection node) -
...@@ -553,10 +554,12 @@ uint PhaseChaitin::build_ifg_physical( ResourceArea *a ) { ...@@ -553,10 +554,12 @@ uint PhaseChaitin::build_ifg_physical( ResourceArea *a ) {
for (uint i = 0; i < cnt; i++) { for (uint i = 0; i < cnt; i++) {
Node* proj = def->raw_out(i); Node* proj = def->raw_out(i);
if (proj->Opcode() == Op_SCMemProj) { if (proj->Opcode() == Op_SCMemProj) {
return false; remove = false;
break;
} }
} }
} }
if (remove) {
block->remove_node(j - 1); block->remove_node(j - 1);
if (lrgs(r)._def == n) { if (lrgs(r)._def == n) {
lrgs(r)._def = 0; lrgs(r)._def = 0;
...@@ -569,6 +572,7 @@ uint PhaseChaitin::build_ifg_physical( ResourceArea *a ) { ...@@ -569,6 +572,7 @@ uint PhaseChaitin::build_ifg_physical( ResourceArea *a ) {
hrp_index[1]--; hrp_index[1]--;
continue; continue;
} }
}
// Fat-projections kill many registers which cannot be used to // Fat-projections kill many registers which cannot be used to
// hold live ranges. // hold live ranges.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册