Skip to content

Commit 1f042e8

Browse files
author
Meghana Gupta
committed
move to function
1 parent 941a858 commit 1f042e8

File tree

3 files changed

+16
-16
lines changed

3 files changed

+16
-16
lines changed

lib/Backend/FlowGraph.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4831,14 +4831,7 @@ BasicBlock::CheckLegalityAndFoldPathDepBranches(GlobOpt* globOpt)
48314831
if (currentInlineeEnd != nullptr && currentInlineeEnd != unskippedInlineeEnd)
48324832
{
48334833
this->GetLastInstr()->InsertBefore(currentInlineeEnd->Copy());
4834-
if (currentInlineeEnd->m_func->m_hasInlineArgsOpt)
4835-
{
4836-
globOpt->RecordInlineeFrameInfo(currentInlineeEnd);
4837-
}
4838-
globOpt->EndTrackingOfArgObjSymsForInlinee();
4839-
4840-
Assert(globOpt->currentBlock->globOptData.inlinedArgOutSize >= currentInlineeEnd->GetArgOutSize(/*getInterpreterArgOutCount*/ false));
4841-
globOpt->currentBlock->globOptData.inlinedArgOutSize -= currentInlineeEnd->GetArgOutSize(/*getInterpreterArgOutCount*/ false);
4834+
globOpt->ProcessInlineeEnd(currentInlineeEnd);
48424835
currentInlineeEnd = nullptr;
48434836
}
48444837
// We are adding an unconditional branch, go over all the current successors and remove the ones that are dead now

lib/Backend/GlobOpt.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -861,6 +861,7 @@ class GlobOpt
861861
void CaptureArguments(BasicBlock *block, BailOutInfo * bailOutInfo, JitArenaAllocator *allocator);
862862
void CaptureByteCodeSymUses(IR::Instr * instr);
863863
IR::ByteCodeUsesInstr * InsertByteCodeUses(IR::Instr * instr, bool includeDef = false);
864+
void ProcessInlineeEnd(IR::Instr * instr);
864865
void TrackCalls(IR::Instr * instr);
865866
void RecordInlineeFrameInfo(IR::Instr* instr);
866867
void EndTrackCall(IR::Instr * instr);

lib/Backend/GlobOptBailOut.cpp

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -467,6 +467,19 @@ GlobOpt::CaptureByteCodeSymUses(IR::Instr * instr)
467467
"Instruction edited before capturing the byte code use");
468468
}
469469

470+
void
471+
GlobOpt::ProcessInlineeEnd(IR::Instr* instr)
472+
{
473+
if (instr->m_func->m_hasInlineArgsOpt)
474+
{
475+
RecordInlineeFrameInfo(instr);
476+
}
477+
EndTrackingOfArgObjSymsForInlinee();
478+
479+
Assert(this->currentBlock->globOptData.inlinedArgOutSize >= instr->GetArgOutSize(/*getInterpreterArgOutCount*/ false));
480+
this->currentBlock->globOptData.inlinedArgOutSize -= instr->GetArgOutSize(/*getInterpreterArgOutCount*/ false);
481+
}
482+
470483
void
471484
GlobOpt::TrackCalls(IR::Instr * instr)
472485
{
@@ -576,14 +589,7 @@ GlobOpt::TrackCalls(IR::Instr * instr)
576589
break;
577590

578591
case Js::OpCode::InlineeEnd:
579-
if (instr->m_func->m_hasInlineArgsOpt)
580-
{
581-
RecordInlineeFrameInfo(instr);
582-
}
583-
EndTrackingOfArgObjSymsForInlinee();
584-
585-
Assert(this->currentBlock->globOptData.inlinedArgOutSize >= instr->GetArgOutSize(/*getInterpreterArgOutCount*/ false));
586-
this->currentBlock->globOptData.inlinedArgOutSize -= instr->GetArgOutSize(/*getInterpreterArgOutCount*/ false);
592+
ProcessInlineeEnd(instr);
587593
break;
588594

589595
case Js::OpCode::InlineeMetaArg:

0 commit comments

Comments
 (0)