Skip to content

Commit 660e1d5

Browse files
committed
Remove unused parameter in DoStackArgsOpt
1 parent 3321ead commit 660e1d5

File tree

6 files changed

+21
-21
lines changed

6 files changed

+21
-21
lines changed

lib/Backend/BackwardPass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,7 @@ BackwardPass::MarkScopeObjSymUseForStackArgOpt()
295295
IR::Instr * instr = this->currentInstr;
296296
if (tag == Js::DeadStorePhase)
297297
{
298-
if (instr->DoStackArgsOpt(this->func) && instr->m_func->GetScopeObjSym() != nullptr && this->DoByteCodeUpwardExposedUsed())
298+
if (instr->DoStackArgsOpt() && instr->m_func->GetScopeObjSym() != nullptr && this->DoByteCodeUpwardExposedUsed())
299299
{
300300
if (this->currentBlock->byteCodeUpwardExposedUsed == nullptr)
301301
{
@@ -315,7 +315,7 @@ BackwardPass::ProcessBailOnStackArgsOutOfActualsRange()
315315
(instr->m_opcode == Js::OpCode::LdElemI_A || instr->m_opcode == Js::OpCode::TypeofElem) &&
316316
instr->HasBailOutInfo() && !IsPrePass())
317317
{
318-
if (instr->DoStackArgsOpt(this->func))
318+
if (instr->DoStackArgsOpt())
319319
{
320320
AssertMsg(instr->GetBailOutKind() & IR::BailOnStackArgsOutOfActualsRange, "Stack args bail out is not set when the optimization is turned on? ");
321321
if (instr->GetBailOutKind() & ~IR::BailOnStackArgsOutOfActualsRange)
@@ -3922,7 +3922,7 @@ IR::Instr *
39223922
BackwardPass::TryChangeInstrForStackArgOpt()
39233923
{
39243924
IR::Instr * instr = this->currentInstr;
3925-
if (tag == Js::DeadStorePhase && instr->DoStackArgsOpt(this->func))
3925+
if (tag == Js::DeadStorePhase && instr->DoStackArgsOpt())
39263926
{
39273927
switch (instr->m_opcode)
39283928
{

lib/Backend/FlowGraph.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3421,7 +3421,7 @@ FlowGraph::RemoveInstr(IR::Instr *instr, GlobOpt * globOpt)
34213421
* - When we restore HeapArguments object in the bail out path, it expects the scope object also to be restored - if one was created.
34223422
*/
34233423
Js::OpCode opcode = instr->m_opcode;
3424-
if (opcode == Js::OpCode::LdElemI_A && instr->DoStackArgsOpt(this->func) &&
3424+
if (opcode == Js::OpCode::LdElemI_A && instr->DoStackArgsOpt() &&
34253425
globOpt->CurrentBlockData()->IsArgumentsOpnd(instr->GetSrc1()) && instr->m_func->GetScopeObjSym())
34263426
{
34273427
IR::ByteCodeUsesInstr * byteCodeUsesInstr = IR::ByteCodeUsesInstr::New(instr);

lib/Backend/GlobOpt.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2404,7 +2404,7 @@ GlobOpt::OptInstr(IR::Instr *&instr, bool* isInstrRemoved)
24042404

24052405
//StackArguments Optimization - We bail out if the index is out of range of actuals.
24062406
if ((instr->m_opcode == Js::OpCode::LdElemI_A || instr->m_opcode == Js::OpCode::TypeofElem) &&
2407-
instr->DoStackArgsOpt(this->func) && !this->IsLoopPrePass())
2407+
instr->DoStackArgsOpt() && !this->IsLoopPrePass())
24082408
{
24092409
GenerateBailAtOperation(&instr, IR::BailOnStackArgsOutOfActualsRange);
24102410
}
@@ -5176,7 +5176,7 @@ GlobOpt::ValueNumberLdElemDst(IR::Instr **pInstr, Value *srcVal)
51765176

51775177
IR::IndirOpnd *src = instr->GetSrc1()->AsIndirOpnd();
51785178
const ValueType baseValueType(src->GetBaseOpnd()->GetValueType());
5179-
if (instr->DoStackArgsOpt(this->func) ||
5179+
if (instr->DoStackArgsOpt() ||
51805180
!(
51815181
baseValueType.IsLikelyOptimizedTypedArray() ||
51825182
(baseValueType.IsLikelyNativeArray() && instr->IsProfiledInstr()) // Specialized native array lowering for LdElem requires that it is profiled.
@@ -5200,7 +5200,7 @@ GlobOpt::ValueNumberLdElemDst(IR::Instr **pInstr, Value *srcVal)
52005200
this->func->GetDebugNumberSet(debugStringBuffer),
52015201
Js::OpCodeUtil::GetOpCodeName(instr->m_opcode),
52025202
baseValueTypeStr,
5203-
instr->DoStackArgsOpt(this->func) ? _u("instruction uses the arguments object") :
5203+
instr->DoStackArgsOpt() ? _u("instruction uses the arguments object") :
52045204
baseValueType.IsLikelyOptimizedTypedArray() ? _u("index is negative or likely not int") : _u("of array type"));
52055205
Output::Flush();
52065206
}
@@ -10738,7 +10738,7 @@ GlobOpt::TypeSpecializeStElem(IR::Instr ** pInstr, Value *src1Val, Value **pDstV
1073810738

1073910739
IR::RegOpnd *baseOpnd = instr->GetDst()->AsIndirOpnd()->GetBaseOpnd();
1074010740
ValueType baseValueType(baseOpnd->GetValueType());
10741-
if (instr->DoStackArgsOpt(this->func) ||
10741+
if (instr->DoStackArgsOpt() ||
1074210742
(!this->DoTypedArrayTypeSpec() && baseValueType.IsLikelyOptimizedTypedArray()) ||
1074310743
(!this->DoNativeArrayTypeSpec() && baseValueType.IsLikelyNativeArray()) ||
1074410744
!(baseValueType.IsLikelyOptimizedTypedArray() || baseValueType.IsLikelyNativeArray()))
@@ -10754,7 +10754,7 @@ GlobOpt::TypeSpecializeStElem(IR::Instr ** pInstr, Value *src1Val, Value **pDstV
1075410754
this->func->GetDebugNumberSet(debugStringBuffer),
1075510755
Js::OpCodeUtil::GetOpCodeName(instr->m_opcode),
1075610756
baseValueTypeStr,
10757-
instr->DoStackArgsOpt(this->func) ?
10757+
instr->DoStackArgsOpt() ?
1075810758
_u("instruction uses the arguments object") :
1075910759
_u("typed array type specialization is disabled, or base is not an optimized typed array"));
1076010760
Output::Flush();
@@ -15589,7 +15589,7 @@ GlobOpt::DoArrayCheckHoist() const
1558915589
bool
1559015590
GlobOpt::DoArrayCheckHoist(const ValueType baseValueType, Loop* loop, IR::Instr const * const instr) const
1559115591
{
15592-
if(!DoArrayCheckHoist() || (instr && !IsLoopPrePass() && instr->DoStackArgsOpt(func)))
15592+
if(!DoArrayCheckHoist() || (instr && !IsLoopPrePass() && instr->DoStackArgsOpt()))
1559315593
{
1559415594
return false;
1559515595
}
@@ -15723,7 +15723,7 @@ GlobOpt::DoLdLenIntSpec(IR::Instr * const instr, const ValueType baseValueType)
1572315723
if(PHASE_OFF(Js::LdLenIntSpecPhase, func) ||
1572415724
IsTypeSpecPhaseOff(func) ||
1572515725
(func->HasProfileInfo() && func->GetReadOnlyProfileInfo()->IsLdLenIntSpecDisabled()) ||
15726-
(instr && !IsLoopPrePass() && instr->DoStackArgsOpt(func)))
15726+
(instr && !IsLoopPrePass() && instr->DoStackArgsOpt()))
1572715727
{
1572815728
return false;
1572915729
}

lib/Backend/IR.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ Instr::IsPlainInstr() const
6868
}
6969

7070
bool
71-
Instr::DoStackArgsOpt(Func *topFunc) const
71+
Instr::DoStackArgsOpt() const
7272
{
7373
return this->usesStackArgumentsObject && m_func->IsStackArgsEnabled();
7474
}

lib/Backend/IR.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,7 +214,7 @@ class Instr
214214
bool StartsBasicBlock() const;
215215
bool EndsBasicBlock() const;
216216
bool HasFallThrough() const;
217-
bool DoStackArgsOpt(Func *topFunc) const;
217+
bool DoStackArgsOpt() const;
218218
bool HasAnyLoadHeapArgsOpCode();
219219
bool IsEqual(IR::Instr *instr) const;
220220

lib/Backend/Lower.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6022,7 +6022,7 @@ Lowerer::GenerateFastLdMethodFromFlags(IR::Instr * instrLdFld)
60226022

60236023
IR::PropertySymOpnd * propertySymOpnd = opndSrc->AsPropertySymOpnd();
60246024

6025-
Assert(!instrLdFld->DoStackArgsOpt(this->m_func));
6025+
Assert(!instrLdFld->DoStackArgsOpt());
60266026

60276027
if (propertySymOpnd->IsTypeCheckSeqCandidate())
60286028
{
@@ -9176,7 +9176,7 @@ Lowerer::LowerLdElemI(IR::Instr * instr, IR::JnHelperMethod helperMethod, bool i
91769176
return instrPrev;
91779177
}
91789178

9179-
if (!isHelper && instr->DoStackArgsOpt(this->m_func))
9179+
if (!isHelper && instr->DoStackArgsOpt())
91809180
{
91819181
IR::LabelInstr * labelLdElem = IR::LabelInstr::New(Js::OpCode::Label, instr->m_func);
91829182
// Pass in null for labelFallThru to only generate the LdHeapArgument call
@@ -17673,12 +17673,12 @@ Lowerer::GenerateFastLdElemI(IR::Instr *& ldElem, bool *instrIsInHelperBlockRef)
1767317673
labelFallThru = ldElem->GetOrCreateContinueLabel();
1767417674
labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
1767517675
// If we know for sure (based on flow graph) we're loading from the arguments object, then ignore the (path-based) profile info.
17676-
bool isNativeArrayLoad = !ldElem->DoStackArgsOpt(this->m_func) && indirOpnd->GetBaseOpnd()->GetValueType().IsLikelyNativeArray();
17676+
bool isNativeArrayLoad = !ldElem->DoStackArgsOpt() && indirOpnd->GetBaseOpnd()->GetValueType().IsLikelyNativeArray();
1767717677
bool needMissingValueCheck = true;
1767817678
bool emittedFastPath = false;
1767917679
bool emitBailout = false;
1768017680

17681-
if (ldElem->DoStackArgsOpt(this->m_func))
17681+
if (ldElem->DoStackArgsOpt())
1768217682
{
1768317683
emittedFastPath = GenerateFastArgumentsLdElemI(ldElem, labelFallThru);
1768417684
emitBailout = true;
@@ -18969,7 +18969,7 @@ Lowerer::GenerateFastLdLen(IR::Instr *ldLen, bool *instrIsInHelperBlockRef)
1896918969

1897018970
IR::LabelInstr *const labelHelper = IR::LabelInstr::New(Js::OpCode::Label, this->m_func, true);
1897118971

18972-
if (ldLen->DoStackArgsOpt(this->m_func))
18972+
if (ldLen->DoStackArgsOpt())
1897318973
{
1897418974
GenerateFastArgumentsLdLen(ldLen, ldLen->GetOrCreateContinueLabel());
1897518975
ldLen->Remove();
@@ -21673,7 +21673,7 @@ Lowerer::GenerateFastArgumentsLdElemI(IR::Instr* ldElem, IR::LabelInstr *labelFa
2167321673
//labelCreateHeapArgs:
2167421674
// ---Bail out to create Heap Arguments object
2167521675

21676-
Assert(ldElem->DoStackArgsOpt(this->m_func));
21676+
Assert(ldElem->DoStackArgsOpt());
2167721677

2167821678
IR::IndirOpnd *indirOpnd = ldElem->GetSrc1()->AsIndirOpnd();
2167921679
bool isInlinee = ldElem->m_func->IsInlinee();
@@ -21804,7 +21804,7 @@ Lowerer::GenerateFastArgumentsLdLen(IR::Instr *ldLen, IR::LabelInstr* labelFallT
2180421804
// JMP $fallthrough
2180521805
//$helper:
2180621806

21807-
Assert(ldLen->DoStackArgsOpt(this->m_func));
21807+
Assert(ldLen->DoStackArgsOpt());
2180821808

2180921809
if(ldLen->m_func->IsInlinee())
2181021810
{
@@ -22005,7 +22005,7 @@ Lowerer::GenerateFastLdFld(IR::Instr * const instrLdFld, IR::JnHelperMethod help
2200522005
IR::Opnd * opndSrc = instrLdFld->GetSrc1();
2200622006
AssertMsg(opndSrc->IsSymOpnd() && opndSrc->AsSymOpnd()->IsPropertySymOpnd() && opndSrc->AsSymOpnd()->m_sym->IsPropertySym(), "Expected PropertySym as src of LdFld");
2200722007

22008-
Assert(!instrLdFld->DoStackArgsOpt(this->m_func));
22008+
Assert(!instrLdFld->DoStackArgsOpt());
2200922009

2201022010
IR::PropertySymOpnd * propertySymOpnd = opndSrc->AsPropertySymOpnd();
2201122011
PropertySym * propertySym = propertySymOpnd->m_sym->AsPropertySym();

0 commit comments

Comments
 (0)