Skip to content
Permalink
Browse files
8262308: [lworld] Various small C2 fixes for bugs found by stress tes…
…ting
  • Loading branch information
TobiHartmann committed Feb 25, 2021
1 parent ab51b60 commit 0dfcc948ea7e14ece823dd1c07ce0c642d67f118
@@ -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;
@@ -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);
}
}

@@ -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");
@@ -133,7 +133,6 @@
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 @@
"-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) {

0 comments on commit 0dfcc94

Please sign in to comment.