File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -1208,6 +1208,16 @@ INST_LIST_ITER G4_BB::getFirstInsertPos() {
12081208 return II;
12091209}
12101210
1211+ INST_LIST_ITER G4_BB::getLastInsertPos () {
1212+ INST_LIST_ITER II = begin ();
1213+ for (INST_LIST_ITER IB = end (); II != IB; ++II) {
1214+ G4_INST *tI = (*II);
1215+ if (tI->isFlowControl () || tI == instList.back ())
1216+ return II;
1217+ }
1218+ return II;
1219+ }
1220+
12111221
12121222//
12131223// Add an EOT send to the end of this BB.
Original file line number Diff line number Diff line change @@ -308,6 +308,8 @@ class G4_BB {
308308
309309 // Return the first insert position if any; otherwise return end().
310310 INST_LIST_ITER getFirstInsertPos ();
311+ // return the last insert position before terminating instruction
312+ INST_LIST_ITER getLastInsertPos ();
311313
312314 void addEOTSend (G4_INST *lastInst = NULL );
313315
You can’t perform that action at this time.
0 commit comments