提交 ddb061f7 编写于 作者: Z Zoltan Varga

Revert "[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't...

Revert "[jit] Optimize ldloc+ldfld operations for valuetypes, so they don't require making a copy of the valuetype. Hopefully fixes #56452. (#5166)"

This reverts commit 025ee639.

Revert this as it seems to break the f# build.
上级 f7c9be48
......@@ -7829,12 +7829,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
CHECK_STACK_OVF (1);
n = ip [1];
CHECK_LOCAL (n);
if ((ip [2] == CEE_LDFLD) && ip_in_bb (cfg, cfg->cbb, ip + 2) && header->locals [n]->type == MONO_TYPE_VALUETYPE) {
/* Avoid loading a struct just to load one of its fields */
EMIT_NEW_LOCLOADA (cfg, ins, n);
} else {
EMIT_NEW_LOCLOAD (cfg, ins, n);
}
EMIT_NEW_LOCLOAD (cfg, ins, n);
*sp++ = ins;
ip += 2;
break;
......@@ -12289,12 +12284,7 @@ mono_method_to_ir (MonoCompile *cfg, MonoMethod *method, MonoBasicBlock *start_b
CHECK_OPSIZE (4);
n = read16 (ip + 2);
CHECK_LOCAL (n);
if ((ip [4] == CEE_LDFLD) && ip_in_bb (cfg, cfg->cbb, ip + 4) && header->locals [n]->type == MONO_TYPE_VALUETYPE) {
/* Avoid loading a struct just to load one of its fields */
EMIT_NEW_LOCLOADA (cfg, ins, n);
} else {
EMIT_NEW_LOCLOAD (cfg, ins, n);
}
EMIT_NEW_LOCLOAD (cfg, ins, n);
*sp++ = ins;
ip += 4;
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册