File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -2701,16 +2701,20 @@ void LivenessAnalysis::computeGenKillandPseudoKill(G4_BB* bb,
2701
2701
//
2702
2702
for (auto && pseudoKill : pseudoKills)
2703
2703
{
2704
- if (pseudoKill.second != bb->rbegin ())
2704
+ INST_LIST_ITER iterToInsert = pseudoKill.second .base ();
2705
+ if (iterToInsert == bb->end ())
2706
+ {
2707
+ std::advance (iterToInsert, -1 );
2708
+ }
2709
+ else
2705
2710
{
2706
- INST_LIST_ITER iterToInsert = pseudoKill.second .base ();
2707
2711
do
2708
2712
{
2709
2713
iterToInsert--;
2710
2714
} while ((*iterToInsert)->isPseudoKill ());
2711
- G4_INST* killInst = fg.builder ->createPseudoKill (pseudoKill.first );
2712
- bb->insert (iterToInsert, killInst);
2713
2715
}
2716
+ G4_INST* killInst = fg.builder ->createPseudoKill (pseudoKill.first );
2717
+ bb->insert (iterToInsert, killInst);
2714
2718
}
2715
2719
2716
2720
//
You can’t perform that action at this time.
0 commit comments