From 12c43b1803037160acbc8bcbe6fb3b9464efc834 Mon Sep 17 00:00:00 2001 From: Henry Zongaro Date: Tue, 17 Oct 2023 17:22:18 -0400 Subject: [PATCH] Use defining symrefs from defining map for call TR_EscapeAnalysisTools::processSymbolReferences uses a BitVector to accumulate the symbol reference numbers for symbols that are to be loaded on an call. In walking through the set of defining symbols associated with a particular local symbol, the code was adding the reference number for the original symbol to the BitVector of symbols to be loaded for the call rather than the reference numbers for the associated defining symbols. That can lead Escape Analysis to miss potential escapes of references through induce OSR blocks or peeked calls. --- runtime/compiler/optimizer/EscapeAnalysisTools.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/runtime/compiler/optimizer/EscapeAnalysisTools.cpp b/runtime/compiler/optimizer/EscapeAnalysisTools.cpp index e4d247f1564..d80911f02b3 100644 --- a/runtime/compiler/optimizer/EscapeAnalysisTools.cpp +++ b/runtime/compiler/optimizer/EscapeAnalysisTools.cpp @@ -202,7 +202,7 @@ void TR_EscapeAnalysisTools::processSymbolReferences(TR_ArrayisAuto() || definingSym->isParm()) && (deadSymRefs == NULL || !deadSymRefs->isSet(definingSymRefNum))) { - symRefsToLoad.set(symRefNum); + symRefsToLoad.set(definingSymRefNum); if (_comp->trace(OMR::escapeAnalysis) || _comp->getOption(TR_TraceOSR)) {