Skip to content

Commit 331aa39

Browse files
committed
[MERGE #5895 @rajatd] Bug fix for enabling inline args opt due to eliminated arguments object references
Merge pull request #5895 from rajatd:bugfix Don't consider eliminated arguments obj references for enabling inline args opt in loop pre-pass as we don't track args obj references in the prepass.
2 parents b808273 + 4ad8083 commit 331aa39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

lib/Backend/GlobOptBailOut.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,9 @@ void
483483
GlobOpt::ProcessInlineeEnd(IR::Instr* instr)
484484
{
485485
if (!PHASE_OFF(Js::StackArgLenConstOptPhase, instr->m_func) &&
486-
(!instr->m_func->GetJITFunctionBody()->UsesArgumentsObject() || instr->m_func->IsStackArgsEnabled())
487-
&& instr->m_func->unoptimizableArgumentsObjReference == 0 && instr->m_func->unoptimizableArgumentsObjReferenceInInlinees == 0)
486+
!IsLoopPrePass() &&
487+
(!instr->m_func->GetJITFunctionBody()->UsesArgumentsObject() || instr->m_func->IsStackArgsEnabled()) &&
488+
instr->m_func->unoptimizableArgumentsObjReference == 0 && instr->m_func->unoptimizableArgumentsObjReferenceInInlinees == 0)
488489
{
489490
instr->m_func->hasUnoptimizedArgumentsAccess = false;
490491
if (!instr->m_func->m_hasInlineArgsOpt && DoInlineArgsOpt(instr->m_func))

0 commit comments

Comments
 (0)