From: Joseph Tremoulet Date: Tue, 17 Jan 2017 19:42:24 +0000 (-0500) Subject: Fix inter-block heap-live-in calculation X-Git-Tag: accepted/tizen/base/20180629.140029~2555^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e1c3cc187b35090318b3338efd5cca420de45999;p=platform%2Fupstream%2Fcoreclr.git Fix inter-block heap-live-in calculation Similar to the intra-block case fixed in #8757, without proving that a heap def completely covers a subsequent heap use, we must propagate heap liveness up past the heap def. Fix failure to so propagate liveness in `LiveVarAnalysis::PerBlockAnalysis`. --- diff --git a/src/jit/liveness.cpp b/src/jit/liveness.cpp index 0d47716..569debb 100644 --- a/src/jit/liveness.cpp +++ b/src/jit/liveness.cpp @@ -1129,7 +1129,9 @@ class LiveVarAnalysis VarSetOps::DiffD(m_compiler, m_liveIn, block->bbVarDef); VarSetOps::UnionD(m_compiler, m_liveIn, block->bbVarUse); - m_heapLiveIn = (m_heapLiveOut && !block->bbHeapDef) || block->bbHeapUse; + // Even if m_heapDef is set, we must assume that it doesn't kill heap if m_heapLiveOut, since + // (without proof otherwise) the use and def may touch different heap memory at run-time. + m_heapLiveIn = m_heapLiveOut || block->bbHeapUse; /* Can exceptions from this block be handled (in this function)? */