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() {
1208
1208
return II;
1209
1209
}
1210
1210
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
+
1211
1221
1212
1222
//
1213
1223
// 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 {
308
308
309
309
// Return the first insert position if any; otherwise return end().
310
310
INST_LIST_ITER getFirstInsertPos ();
311
+ // return the last insert position before terminating instruction
312
+ INST_LIST_ITER getLastInsertPos ();
311
313
312
314
void addEOTSend (G4_INST *lastInst = NULL );
313
315
You can’t perform that action at this time.
0 commit comments