Skip to content
Permalink
Browse files

Remove redundant method introduced by a bad merge

  • Loading branch information...
nhat-nguyen committed Jul 10, 2019
1 parent 90b86b5 commit bc4056a54f60a5ea287d8426fda94394235b0f6f
Showing with 0 additions and 54 deletions.
  1. +0 −53 lib/Backend/BackwardPass.cpp
  2. +0 −1 lib/Backend/BackwardPass.h
@@ -4369,59 +4369,6 @@ BackwardPass::TraceBlockUses(BasicBlock * block, bool isStart)

#endif

bool
BackwardPass::UpdateImplicitCallBailOutKind(IR::Instr *const instr, bool needsBailOutOnImplicitCall)
{
Assert(instr);
Assert(instr->HasBailOutInfo());

IR::BailOutKind implicitCallBailOutKind = needsBailOutOnImplicitCall ? IR::BailOutOnImplicitCalls : IR::BailOutInvalid;

IR::BailOutKind instrBailOutKind = instr->GetBailOutKind();
if (instrBailOutKind & IR::BailOutMarkTempObject)
{
// Remove the mark temp object bit, as we don't need it after the dead store pass
instrBailOutKind &= ~IR::BailOutMarkTempObject;
instr->SetBailOutKind(instrBailOutKind);

if (!instr->GetBailOutInfo()->canDeadStore)
{
return true;
}
}

const IR::BailOutKind instrImplicitCallBailOutKind = instrBailOutKind & ~IR::BailOutKindBits;
if(instrImplicitCallBailOutKind == IR::BailOutOnImplicitCallsPreOp)
{
if(needsBailOutOnImplicitCall)
{
implicitCallBailOutKind = IR::BailOutOnImplicitCallsPreOp;
}
}
else if(instrImplicitCallBailOutKind != IR::BailOutOnImplicitCalls && instrImplicitCallBailOutKind != IR::BailOutInvalid)
{
// This bailout kind (the value of 'instrImplicitCallBailOutKind') must guarantee that implicit calls will not happen.
// If it doesn't make such a guarantee, it must be possible to merge this bailout kind with an implicit call bailout
// kind, and therefore should be part of BailOutKindBits.
Assert(!needsBailOutOnImplicitCall);
return true;
}

if(instrImplicitCallBailOutKind == implicitCallBailOutKind)
{
return true;
}

const IR::BailOutKind newBailOutKind = instrBailOutKind - instrImplicitCallBailOutKind + implicitCallBailOutKind;
if(newBailOutKind == IR::BailOutInvalid)
{
return false;
}

instr->SetBailOutKind(newBailOutKind);
return true;
}

bool
BackwardPass::ProcessNoImplicitCallUses(IR::Instr *const instr)
{
@@ -78,7 +78,6 @@ class BackwardPass
#endif

static bool UpdateImplicitCallBailOutKind(IR::Instr *const instr, bool needsBailOutOnImplicitCall, bool needsLazyBailOut);
static bool UpdateImplicitCallBailOutKind(IR::Instr* const instr, bool needsBailOutOnImplicitCall);

bool ProcessNoImplicitCallUses(IR::Instr *const instr);
void ProcessNoImplicitCallDef(IR::Instr *const instr);

0 comments on commit bc4056a

Please sign in to comment.
You can’t perform that action at this time.