diff --git a/src/hotspot/share/opto/graphKit.cpp b/src/hotspot/share/opto/graphKit.cpp index 94470ea98e2..b06821f496d 100644 --- a/src/hotspot/share/opto/graphKit.cpp +++ b/src/hotspot/share/opto/graphKit.cpp @@ -3100,7 +3100,7 @@ Node* GraphKit::type_check_receiver(Node* receiver, ciKlass* klass, Node* res = _gvn.transform(cast); if (recv_xtype->is_inlinetypeptr() && recv_xtype->inline_klass()->is_scalarizable()) { assert(!gvn().type(res)->maybe_null(), "receiver should never be null"); - res = InlineTypeNode::make_from_oop(this, res, recv_xtype->inline_klass()); + res = InlineTypeNode::make_from_oop(this, res, recv_xtype->inline_klass())->as_ptr(&gvn()); } (*casted_receiver) = res; diff --git a/src/hotspot/share/opto/inlinetypenode.cpp b/src/hotspot/share/opto/inlinetypenode.cpp index e965b3a711e..df2f06bd240 100644 --- a/src/hotspot/share/opto/inlinetypenode.cpp +++ b/src/hotspot/share/opto/inlinetypenode.cpp @@ -245,7 +245,7 @@ void InlineTypeBaseNode::make_scalar_in_safepoints(PhaseIterGVN* igvn, bool allo vt->make_scalar_in_safepoints(igvn); } if (outcnt() == 0) { - igvn->remove_dead_node(this); + igvn->_worklist.push(this); } } diff --git a/src/hotspot/share/opto/macro.cpp b/src/hotspot/share/opto/macro.cpp index 2d0f5b920e3..7fbb8f5e6db 100644 --- a/src/hotspot/share/opto/macro.cpp +++ b/src/hotspot/share/opto/macro.cpp @@ -1009,8 +1009,13 @@ static void disconnect_projections(MultiNode* n, PhaseIterGVN& igvn) { // Process users of eliminated allocation. void PhaseMacroExpand::process_users_of_allocation(CallNode *alloc, bool inline_alloc) { + Unique_Node_List worklist; Node* res = alloc->result_cast(); if (res != NULL) { + worklist.push(res); + } + while (worklist.size() > 0) { + res = worklist.pop(); for (DUIterator_Last jmin, j = res->last_outs(jmin); j >= jmin; ) { Node *use = res->last_out(j); uint oc1 = res->outcnt(); @@ -1076,6 +1081,12 @@ void PhaseMacroExpand::process_users_of_allocation(CallNode *alloc, bool inline_ assert(use->isa_InlineType()->get_oop() == res, "unexpected inline type use"); _igvn.rehash_node_delayed(use); use->isa_InlineType()->set_oop(_igvn.zerocon(T_INLINE_TYPE)); + } else if (use->is_InlineTypePtr()) { + assert(use->isa_InlineTypePtr()->get_oop() == res, "unexpected inline type ptr use"); + _igvn.rehash_node_delayed(use); + use->isa_InlineTypePtr()->set_oop(_igvn.zerocon(T_INLINE_TYPE)); + // Process users + worklist.push(use); } else if (use->Opcode() == Op_StoreX && use->in(MemNode::Address) == res) { // Store to mark word of inline type larval buffer assert(inline_alloc, "Unexpected store to mark word"); diff --git a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/InlineTypeTest.java b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/InlineTypeTest.java index 56ae70b04c1..584d699d688 100644 --- a/test/hotspot/jtreg/compiler/valhalla/inlinetypes/InlineTypeTest.java +++ b/test/hotspot/jtreg/compiler/valhalla/inlinetypes/InlineTypeTest.java @@ -133,7 +133,6 @@ public abstract class InlineTypeTest { private static final boolean PRINT_TIMES = Boolean.parseBoolean(System.getProperty("PrintTimes", "false")); private static final boolean COMPILE_COMMANDS = Boolean.parseBoolean(System.getProperty("CompileCommands", "true")) && !XCOMP; private static boolean VERIFY_IR = Boolean.parseBoolean(System.getProperty("VerifyIR", "true")) && !XCOMP && !TEST_C1 && COMPILE_COMMANDS; - private static final boolean VERIFY_VM = Boolean.parseBoolean(System.getProperty("VerifyVM", "false")); private static final String SCENARIOS = System.getProperty("Scenarios", ""); private static final String TESTLIST = System.getProperty("Testlist", ""); private static final String EXCLUDELIST = System.getProperty("Exclude", ""); @@ -158,9 +157,6 @@ public abstract class InlineTypeTest { "-XX:CompileCommand=compileonly,compiler.valhalla.inlinetypes.*::*"}; private static final String[] printFlags = { "-XX:+PrintCompilation", "-XX:+PrintIdeal", "-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintOptoAssembly"}; - private static final String[] verifyFlags = { - "-XX:+UnlockDiagnosticVMOptions", "-XX:+VerifyOops", "-XX:+VerifyStack", "-XX:+VerifyLastFrame", - "-XX:+VerifyBeforeGC", "-XX:+VerifyAfterGC", "-XX:+VerifyDuringGC", "-XX:+VerifyAdapterSharing"}; protected static final int InlineTypePassFieldsAsArgsOn = 0x1; protected static final int InlineTypePassFieldsAsArgsOff = 0x2; @@ -455,7 +451,7 @@ private void execute_vm() throws Throwable { } } // Each VM is launched with flags in this order, so the later ones can override the earlier one: - // VERIFY_IR/VERIFY_VM flags specified below + // VERIFY_IR flags specified below // vmInputArgs, which consists of: // @run options // getVMParameters() @@ -469,9 +465,6 @@ private void execute_vm() throws Throwable { // Always trap for exception throwing to not confuse IR verification cmds = concat(cmds, "-XX:-OmitStackTraceInFastThrow"); } - if (VERIFY_VM) { - cmds = concat(cmds, verifyFlags); - } cmds = concat(cmds, vmInputArgs); cmds = concat(cmds, defaultFlags); if (COMPILE_COMMANDS) {