From: Joseph Tremoulet Date: Wed, 11 Jan 2017 20:59:29 +0000 (-0500) Subject: Remove bogus fgCurHeapDef guard X-Git-Tag: submit/tizen/20210909.063632~11030^2~8461^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=4f0b9a464127e9973ad7748c49c02d0e4027d6b9;p=platform%2Fupstream%2Fdotnet%2Fruntime.git Remove bogus fgCurHeapDef guard We should set fgCurHeapUse when visiting a heap use regardless of whether fgCurHeapDef is set, because we haven't proven that the def writes all memory that the use might read. This should have been included in dotnet/coreclr#8757 but somehow slipped through. Commit migrated from https://github.com/dotnet/coreclr/commit/334cf4e004367b8c0c717fe3974ae008ecec0f62 --- diff --git a/src/coreclr/src/jit/liveness.cpp b/src/coreclr/src/jit/liveness.cpp index 60ef1a1..0d47716 100644 --- a/src/coreclr/src/jit/liveness.cpp +++ b/src/coreclr/src/jit/liveness.cpp @@ -265,10 +265,7 @@ void Compiler::fgPerNodeLocalVarLiveness(GenTree* tree) GenTreePtr addrArg = tree->gtOp.gtOp1->gtEffectiveVal(/*commaOnly*/ true); if (!addrArg->DefinesLocalAddr(this, /*width doesn't matter*/ 0, &dummyLclVarTree, &dummyIsEntire)) { - if (!fgCurHeapDef) - { - fgCurHeapUse = true; - } + fgCurHeapUse = true; } else {