Skip to content

Commit

Permalink
[jit] Avoid licm for volatile variables, ssa ignores them so we can't…
Browse files Browse the repository at this point in the history
… detect whenever they are loop invariant by looking at phi nodes.
  • Loading branch information
vargaz committed Jun 4, 2014
1 parent a2c3c36 commit 9932336
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mono/mini/ssa.c
Original file line number Diff line number Diff line change
Expand Up @@ -1424,7 +1424,7 @@ mono_ssa_loop_invariant_code_motion (MonoCompile *cfg)
else
sreg = -1;
if (sreg != -1) {
MonoInst *tins;
MonoInst *tins, *var;

skip = FALSE;
for (tins = ins->prev; tins; tins = tins->prev) {
Expand All @@ -1439,6 +1439,9 @@ mono_ssa_loop_invariant_code_motion (MonoCompile *cfg)
}
if (skip)
continue;
var = get_vreg_to_inst (cfg, sreg);
if (var && (var->flags & (MONO_INST_VOLATILE|MONO_INST_INDIRECT)))
continue;
ins->sreg1 = sreg;
}

Expand Down

0 comments on commit 9932336

Please sign in to comment.