--- a/src/hotspot/share/opto/macro.cpp Wed Jan 17 22:44:40 2018 +0100
+++ b/src/hotspot/share/opto/macro.cpp Wed Jan 17 14:25:47 2018 -0800
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@@ -496,7 +496,7 @@
if (level <= 0) {
return NULL; // Give up: phi tree too deep
}
- Node *start_mem = C->start()->proj_out(TypeFunc::Memory);
+ Node *start_mem = C->start()->proj_out_or_null(TypeFunc::Memory);
Node *alloc_mem = alloc->in(TypeFunc::Memory);
uint length = mem->req();
@@ -576,7 +576,7 @@
int alias_idx = C->get_alias_index(adr_t);
int offset = adr_t->offset();
- Node *start_mem = C->start()->proj_out(TypeFunc::Memory);
+ Node *start_mem = C->start()->proj_out_or_null(TypeFunc::Memory);
Node *alloc_ctrl = alloc->in(TypeFunc::Control);
Node *alloc_mem = alloc->in(TypeFunc::Memory);
Arena *a = Thread::current()->resource_area();
@@ -974,8 +974,8 @@
}
static void disconnect_projections(MultiNode* n, PhaseIterGVN& igvn) {
- Node* ctl_proj = n->proj_out(TypeFunc::Control);
- Node* mem_proj = n->proj_out(TypeFunc::Memory);
+ Node* ctl_proj = n->proj_out_or_null(TypeFunc::Control);
+ Node* mem_proj = n->proj_out_or_null(TypeFunc::Memory);
if (ctl_proj != NULL) {
igvn.replace_node(ctl_proj, n->in(0));
}
@@ -1086,12 +1086,12 @@
// Eliminate Initialize node.
InitializeNode *init = use->as_Initialize();
assert(init->outcnt() <= 2, "only a control and memory projection expected");
- Node *ctrl_proj = init->proj_out(TypeFunc::Control);
+ Node *ctrl_proj = init->proj_out_or_null(TypeFunc::Control);
if (ctrl_proj != NULL) {
assert(init->in(TypeFunc::Control) == _fallthroughcatchproj, "allocation control projection");
_igvn.replace_node(ctrl_proj, _fallthroughcatchproj);
}
- Node *mem_proj = init->proj_out(TypeFunc::Memory);
+ Node *mem_proj = init->proj_out_or_null(TypeFunc::Memory);
if (mem_proj != NULL) {
Node *mem = init->in(TypeFunc::Memory);
#ifdef ASSERT
@@ -1198,7 +1198,7 @@
bool PhaseMacroExpand::eliminate_boxing_node(CallStaticJavaNode *boxing) {
// EA should remove all uses of non-escaping boxing node.
- if (!C->eliminate_boxing() || boxing->proj_out(TypeFunc::Parms) != NULL) {
+ if (!C->eliminate_boxing() || boxing->proj_out_or_null(TypeFunc::Parms) != NULL) {
return false;
}
@@ -1580,8 +1580,8 @@
// before the InitializeNode happen before the storestore
// barrier.
- Node* init_ctrl = init->proj_out(TypeFunc::Control);
- Node* init_mem = init->proj_out(TypeFunc::Memory);
+ Node* init_ctrl = init->proj_out_or_null(TypeFunc::Control);
+ Node* init_mem = init->proj_out_or_null(TypeFunc::Memory);
MemBarNode* mb = MemBarNode::make(C, Op_MemBarStoreStore, Compile::AliasIdxBot);
transform_later(mb);