Skip to content

Commit

Permalink
Merge pull request dotnet#4303 from CarolEidt/NoBarrierLclVarAddr
Browse files Browse the repository at this point in the history
No GC barrier needed for indirection of expressions involving lclVars
  • Loading branch information
CarolEidt committed Apr 13, 2016
2 parents 8ba667b + 39ac496 commit 3ad8f15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/jit/gcinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -704,7 +704,7 @@ GCInfo::WriteBarrierForm GCInfo::gcWriteBarrierFormFromTargetAddress(GenTreePtr
}
}
}
if (tgtAddr->OperGet() == GT_ADDR && tgtAddr->gtOp.gtOp1->OperGet() == GT_LCL_VAR)
if (tgtAddr->IsLocalAddrExpr() != nullptr)
{
// No need for a GC barrier when writing to a local variable.
return GCInfo::WBF_NoBarrier;
Expand Down

0 comments on commit 3ad8f15

Please sign in to comment.