@@ -1991,7 +1991,7 @@ namespace IGC {
1991
1991
if (CurrentCandidateInsts.size () > 0 &&
1992
1992
Id == GenISAIntrinsic::GenISA_LSC2DBlockReadAddrPayload)
1993
1993
{
1994
- if (!SinkFromPH && !allUsesAreDominatedByUndoPoint (CurrentCandidateInsts, CurrentCandidateInsts[0 ]))
1994
+ if (!SinkFromPH && !allUsesAreDominatedByUndoPoint (CurrentCandidateInsts, CurrentCandidateInsts[0 ]-> getNextNode () ))
1995
1995
{
1996
1996
PrintDump (VerbosityLevel::High, " Not all the uses are dominated by the UndoPoint, skipping.\n " );
1997
1997
return false ;
@@ -2229,7 +2229,7 @@ namespace IGC {
2229
2229
}
2230
2230
2231
2231
DenseMap<InsertElementInst *, InstSet> DestVecToShuffleInst;
2232
- SmallVector<Candidate, 16 > ShuffleCandidates;
2232
+ CandidateVec ShuffleCandidates;
2233
2233
DenseMap<Instruction *, Candidate *> ShuffleInstToCandidate;
2234
2234
2235
2235
for (auto &VecIEs : SourceVectors)
@@ -2279,12 +2279,12 @@ namespace IGC {
2279
2279
PrintDump (VerbosityLevel::Medium, " DestVector used in the loop:\n " );
2280
2280
PrintInstructionDump (VerbosityLevel::Medium, DestVec);
2281
2281
2282
- ShuffleCandidates.emplace_back ( InstrVec{}, TgtBB, SinkFromPH ? LoopSinkWorthiness::Sink : LoopSinkWorthiness::IntraLoopSink, nullptr );
2282
+ ShuffleCandidates.push_back (std::make_unique<Candidate>( InstrVec{}, TgtBB, SinkFromPH ? LoopSinkWorthiness::Sink : LoopSinkWorthiness::IntraLoopSink, nullptr ) );
2283
2283
Changed = true ;
2284
2284
2285
2285
for (Instruction *I : ShuffleInst)
2286
2286
{
2287
- ShuffleInstToCandidate[I] = & ShuffleCandidates.back ();
2287
+ ShuffleInstToCandidate[I] = ShuffleCandidates.back (). get ();
2288
2288
}
2289
2289
}
2290
2290
}
0 commit comments