@@ -8583,7 +8583,8 @@ SDDbgValue *SelectionDAG::getDbgValue(DIVariable *Var, DIExpression *Expr,
8583
8583
assert (cast<DILocalVariable>(Var)->isValidLocationForIntrinsic (DL) &&
8584
8584
" Expected inlined-at fields to agree" );
8585
8585
return new (DbgInfo->getAlloc ())
8586
- SDDbgValue (Var, Expr, SDDbgOperand::fromNode (N, R), N, IsIndirect, DL, O,
8586
+ SDDbgValue (DbgInfo->getAlloc (), Var, Expr, SDDbgOperand::fromNode (N, R),
8587
+ {}, IsIndirect, DL, O,
8587
8588
/* IsVariadic=*/ false );
8588
8589
}
8589
8590
@@ -8594,9 +8595,10 @@ SDDbgValue *SelectionDAG::getConstantDbgValue(DIVariable *Var,
8594
8595
const DebugLoc &DL, unsigned O) {
8595
8596
assert (cast<DILocalVariable>(Var)->isValidLocationForIntrinsic (DL) &&
8596
8597
" Expected inlined-at fields to agree" );
8597
- return new (DbgInfo->getAlloc ()) SDDbgValue (
8598
- Var, Expr, SDDbgOperand::fromConst (C), {}, /* IsIndirect=*/ false , DL, O,
8599
- /* IsVariadic=*/ false );
8598
+ return new (DbgInfo->getAlloc ())
8599
+ SDDbgValue (DbgInfo->getAlloc (), Var, Expr, SDDbgOperand::fromConst (C), {},
8600
+ /* IsIndirect=*/ false , DL, O,
8601
+ /* IsVariadic=*/ false );
8600
8602
}
8601
8603
8602
8604
// / FrameIndex
@@ -8620,8 +8622,8 @@ SDDbgValue *SelectionDAG::getFrameIndexDbgValue(DIVariable *Var,
8620
8622
assert (cast<DILocalVariable>(Var)->isValidLocationForIntrinsic (DL) &&
8621
8623
" Expected inlined-at fields to agree" );
8622
8624
return new (DbgInfo->getAlloc ())
8623
- SDDbgValue (Var, Expr, SDDbgOperand::fromFrameIdx (FI), Dependencies ,
8624
- IsIndirect, DL, O,
8625
+ SDDbgValue (DbgInfo-> getAlloc (), Var, Expr, SDDbgOperand::fromFrameIdx (FI),
8626
+ Dependencies, IsIndirect, DL, O,
8625
8627
/* IsVariadic=*/ false );
8626
8628
}
8627
8629
@@ -8632,7 +8634,8 @@ SDDbgValue *SelectionDAG::getVRegDbgValue(DIVariable *Var, DIExpression *Expr,
8632
8634
assert (cast<DILocalVariable>(Var)->isValidLocationForIntrinsic (DL) &&
8633
8635
" Expected inlined-at fields to agree" );
8634
8636
return new (DbgInfo->getAlloc ())
8635
- SDDbgValue (Var, Expr, SDDbgOperand::fromVReg (VReg), {}, IsIndirect, DL, O,
8637
+ SDDbgValue (DbgInfo->getAlloc (), Var, Expr, SDDbgOperand::fromVReg (VReg),
8638
+ {}, IsIndirect, DL, O,
8636
8639
/* IsVariadic=*/ false );
8637
8640
}
8638
8641
@@ -8644,7 +8647,8 @@ SDDbgValue *SelectionDAG::getDbgValueList(DIVariable *Var, DIExpression *Expr,
8644
8647
assert (cast<DILocalVariable>(Var)->isValidLocationForIntrinsic (DL) &&
8645
8648
" Expected inlined-at fields to agree" );
8646
8649
return new (DbgInfo->getAlloc ())
8647
- SDDbgValue (Var, Expr, Locs, Dependencies, IsIndirect, DL, O, IsVariadic);
8650
+ SDDbgValue (DbgInfo->getAlloc (), Var, Expr, Locs, Dependencies, IsIndirect,
8651
+ DL, O, IsVariadic);
8648
8652
}
8649
8653
8650
8654
void SelectionDAG::transferDbgValues (SDValue From, SDValue To,
@@ -8707,12 +8711,10 @@ void SelectionDAG::transferDbgValues(SDValue From, SDValue To,
8707
8711
Expr = *Fragment;
8708
8712
}
8709
8713
8710
- auto NewDependencies = Dbg->copySDNodes ();
8711
- std::replace (NewDependencies.begin (), NewDependencies.end (), FromNode,
8712
- ToNode);
8714
+ auto AdditionalDependencies = Dbg->getAdditionalDependencies ();
8713
8715
// Clone the SDDbgValue and move it to To.
8714
8716
SDDbgValue *Clone = getDbgValueList (
8715
- Var, Expr, NewLocOps, NewDependencies , Dbg->isIndirect (),
8717
+ Var, Expr, NewLocOps, AdditionalDependencies , Dbg->isIndirect (),
8716
8718
Dbg->getDebugLoc (), std::max (ToNode->getIROrder (), Dbg->getOrder ()),
8717
8719
Dbg->isVariadic ());
8718
8720
ClonedDVs.push_back (Clone);
@@ -8772,11 +8774,9 @@ void SelectionDAG::salvageDebugInfo(SDNode &N) {
8772
8774
(void )Changed;
8773
8775
assert (Changed && " Salvage target doesn't use N" );
8774
8776
8775
- auto NewDependencies = DV->copySDNodes ();
8776
- std::replace (NewDependencies.begin (), NewDependencies.end (), &N,
8777
- N0.getNode ());
8777
+ auto AdditionalDependencies = DV->getAdditionalDependencies ();
8778
8778
SDDbgValue *Clone = getDbgValueList (DV->getVariable (), DIExpr,
8779
- NewLocOps, NewDependencies ,
8779
+ NewLocOps, AdditionalDependencies ,
8780
8780
DV->isIndirect (), DV->getDebugLoc (),
8781
8781
DV->getOrder (), DV->isVariadic ());
8782
8782
ClonedDVs.push_back (Clone);
0 commit comments