@@ -231,11 +231,11 @@ G4_INST* IR_Builder::createInst(G4_Predicate* prd,
231
231
G4_INST* i = NULL ;
232
232
if (G4_Inst_Table[op].instType == InstTypeFlow)
233
233
{
234
- i = new (mem)G4_InstCF (useDefAllocator, instAllocList, prd, op, mod, sat, size, dst, src0, src1, option);
234
+ i = new (mem)G4_InstCF (useDefAllocator, prd, op, mod, sat, size, dst, src0, src1, option);
235
235
}
236
236
else
237
237
{
238
- i = new (mem)G4_INST (useDefAllocator, instAllocList, prd, op, mod, sat, size, dst, src0, src1, option);
238
+ i = new (mem)G4_INST (useDefAllocator, prd, op, mod, sat, size, dst, src0, src1, option);
239
239
}
240
240
241
241
i->setCISAOff (curCISAOffset);
@@ -245,6 +245,7 @@ G4_INST* IR_Builder::createInst(G4_Predicate* prd,
245
245
i->setLocation (new (mem) MDLocation (lineno == 0 ? curLine : lineno, curFile));
246
246
}
247
247
248
+ instAllocList.push_back (i);
248
249
instList.push_back (i);
249
250
250
251
return i;
@@ -282,11 +283,11 @@ G4_INST* IR_Builder::createInternalInst(G4_Predicate* prd,
282
283
283
284
if (G4_Inst_Table[op].instType == InstTypeFlow)
284
285
{
285
- i = new (mem)G4_InstCF (useDefAllocator, instAllocList, prd, op, mod, sat, size, dst, src0, src1, option);
286
+ i = new (mem)G4_InstCF (useDefAllocator, prd, op, mod, sat, size, dst, src0, src1, option);
286
287
}
287
288
else
288
289
{
289
- i = new (mem)G4_INST (useDefAllocator, instAllocList, prd, op, mod, sat, size, dst, src0, src1, option);
290
+ i = new (mem)G4_INST (useDefAllocator, prd, op, mod, sat, size, dst, src0, src1, option);
290
291
}
291
292
292
293
i->setCISAOff (CISAoff);
@@ -296,6 +297,7 @@ G4_INST* IR_Builder::createInternalInst(G4_Predicate* prd,
296
297
i->setLocation (new (mem) MDLocation (lineno, curFile));
297
298
}
298
299
300
+ instAllocList.push_back (i);
299
301
return i;
300
302
}
301
303
@@ -314,7 +316,7 @@ G4_INST* IR_Builder::createInternalCFInst(
314
316
MUST_BE_TRUE (G4_Inst_Table[op].instType == InstTypeFlow,
315
317
" IR_Builder::createInternalCFInst must be used with InstTypeFlow instruction class" );
316
318
317
- G4_InstCF* i = new (mem)G4_InstCF (useDefAllocator, instAllocList, prd, op, NULL , false , size, NULL , NULL , NULL , option);
319
+ G4_InstCF* i = new (mem)G4_InstCF (useDefAllocator, prd, op, NULL , false , size, NULL , NULL , NULL , option);
318
320
319
321
i->setJip ( jip );
320
322
i->setUip ( uip );
@@ -326,6 +328,7 @@ G4_INST* IR_Builder::createInternalCFInst(
326
328
i->setLocation (new (mem) MDLocation (lineno, curFile));
327
329
}
328
330
331
+ instAllocList.push_back (i);
329
332
return i;
330
333
}
331
334
@@ -361,11 +364,11 @@ G4_INST* IR_Builder::createInst(G4_Predicate* prd,
361
364
362
365
if (G4_Inst_Table[op].instType == InstTypeFlow)
363
366
{
364
- i = new (mem)G4_InstCF (useDefAllocator, instAllocList, prd, op, mod, sat, size, dst, src0, src1, src2, option);
367
+ i = new (mem)G4_InstCF (useDefAllocator, prd, op, mod, sat, size, dst, src0, src1, src2, option);
365
368
}
366
369
else
367
370
{
368
- i = new (mem)G4_INST (useDefAllocator, instAllocList, prd, op, mod, sat, size, dst, src0, src1, src2, option);
371
+ i = new (mem)G4_INST (useDefAllocator, prd, op, mod, sat, size, dst, src0, src1, src2, option);
369
372
}
370
373
371
374
i->setCISAOff (curCISAOffset);
@@ -375,6 +378,7 @@ G4_INST* IR_Builder::createInst(G4_Predicate* prd,
375
378
i->setLocation (new (mem) MDLocation (lineno == 0 ? curLine : lineno, curFile));
376
379
}
377
380
381
+ instAllocList.push_back (i);
378
382
instList.push_back (i);
379
383
380
384
return i;
@@ -411,11 +415,11 @@ G4_INST* IR_Builder::createInternalInst(G4_Predicate* prd,
411
415
G4_INST* i = NULL ;
412
416
if (G4_Inst_Table[op].instType == InstTypeFlow)
413
417
{
414
- i = new (mem)G4_InstCF (useDefAllocator, instAllocList, prd, op, mod, sat, size, dst, src0, src1, src2, option);
418
+ i = new (mem)G4_InstCF (useDefAllocator, prd, op, mod, sat, size, dst, src0, src1, src2, option);
415
419
}
416
420
else
417
421
{
418
- i = new (mem)G4_INST (useDefAllocator, instAllocList, prd, op, mod, sat, size, dst, src0, src1, src2, option);
422
+ i = new (mem)G4_INST (useDefAllocator, prd, op, mod, sat, size, dst, src0, src1, src2, option);
419
423
}
420
424
421
425
i->setCISAOff (CISAoff);
@@ -425,6 +429,7 @@ G4_INST* IR_Builder::createInternalInst(G4_Predicate* prd,
425
429
i->setLocation (new (mem) MDLocation (lineno, curFile));
426
430
}
427
431
432
+ instAllocList.push_back (i);
428
433
return i;
429
434
}
430
435
@@ -441,7 +446,7 @@ G4_INST* IR_Builder::createSendInst(G4_Predicate* prd,
441
446
{
442
447
443
448
assert (msgDesc && " msgDesc must not be null" );
444
- G4_INST* m = new (mem)G4_INST (useDefAllocator, instAllocList, prd, op, NULL , false , size, postDst, currSrc, msg, option);
449
+ G4_INST* m = new (mem)G4_INST (useDefAllocator, prd, op, NULL , false , size, postDst, currSrc, msg, option);
445
450
446
451
// /used in binary encoding
447
452
m->setMsgDesc ( msgDesc );
@@ -453,6 +458,7 @@ G4_INST* IR_Builder::createSendInst(G4_Predicate* prd,
453
458
m->setLocation (new (mem) MDLocation (lineno == 0 ? curLine : lineno, curFile));
454
459
}
455
460
461
+ instAllocList.push_back (m);
456
462
instList.push_back (m);
457
463
return m;
458
464
}
@@ -482,7 +488,7 @@ G4_INST* IR_Builder::createSplitSendInst(G4_Predicate* prd,
482
488
MUST_BE_TRUE (msgDesc->extMessageLength () == 0 , " src1 length must be 0 if it is null" );
483
489
src1 = createNullSrc (Type_UD);
484
490
}
485
- G4_INST* m = new (mem)G4_INST (useDefAllocator, instAllocList, prd, op, NULL , false , size, dst, src0, src1, msg, option);
491
+ G4_INST* m = new (mem)G4_INST (useDefAllocator, prd, op, NULL , false , size, dst, src0, src1, msg, option);
486
492
487
493
m->setMsgDesc ( msgDesc );
488
494
@@ -492,16 +498,11 @@ G4_INST* IR_Builder::createSplitSendInst(G4_Predicate* prd,
492
498
{
493
499
m->setLocation (new (mem) MDLocation (lineno == 0 ? curLine : lineno, curFile));
494
500
}
501
+ m->setSrc (src3 ? src3 : createImm (msgDesc->getExtendedDesc (), Type_UD), 3 );
495
502
503
+ instAllocList.push_back (m);
496
504
instList.push_back (m);
497
- if (src3 != NULL )
498
- {
499
- m->setSrc (src3, 3 );
500
- }
501
- else
502
- {
503
- m->setSrc (createImm (msgDesc->getExtendedDesc (), Type_UD), 3 );
504
- }
505
+
505
506
return m;
506
507
}
507
508
//
@@ -520,7 +521,7 @@ G4_INST* IR_Builder::createMathInst(G4_Predicate* prd,
520
521
unsigned int option,
521
522
int lineno)
522
523
{
523
- G4_INST* i = new (mem)G4_InstMath (useDefAllocator, instAllocList, prd, G4_math, NULL , sat, size, dst, src0, src1, option, mathOp);
524
+ G4_INST* i = new (mem)G4_InstMath (useDefAllocator, prd, G4_math, NULL , sat, size, dst, src0, src1, option, mathOp);
524
525
525
526
i->setCISAOff (curCISAOffset);
526
527
@@ -529,6 +530,7 @@ G4_INST* IR_Builder::createMathInst(G4_Predicate* prd,
529
530
i->setLocation (new (mem) MDLocation (lineno == 0 ? curLine : lineno, curFile));
530
531
}
531
532
533
+ instAllocList.push_back (i);
532
534
instList.push_back (i);
533
535
return i;
534
536
}
@@ -538,7 +540,7 @@ G4_INST* IR_Builder::createIntrinsicInst(G4_Predicate* prd, Intrinsic intrinId,
538
540
G4_Operand* src0, G4_Operand* src1, G4_Operand* src2,
539
541
unsigned int option, int lineno)
540
542
{
541
- G4_INST* i = new (mem) G4_InstIntrinsic (useDefAllocator, instAllocList, prd, intrinId, size, dst, src0, src1, src2, option);
543
+ G4_INST* i = new (mem) G4_InstIntrinsic (useDefAllocator, prd, intrinId, size, dst, src0, src1, src2, option);
542
544
543
545
i->setCISAOff (curCISAOffset);
544
546
@@ -547,6 +549,7 @@ G4_INST* IR_Builder::createIntrinsicInst(G4_Predicate* prd, Intrinsic intrinId,
547
549
i->setLocation (new (mem) MDLocation (lineno == 0 ? curLine : lineno, curFile));
548
550
}
549
551
552
+ instAllocList.push_back (i);
550
553
instList.push_back (i);
551
554
return i;
552
555
}
@@ -556,7 +559,7 @@ G4_INST* IR_Builder::createInternalIntrinsicInst(G4_Predicate* prd, Intrinsic in
556
559
G4_Operand* src0, G4_Operand* src1, G4_Operand* src2,
557
560
unsigned int option, int lineno)
558
561
{
559
- G4_INST* i = new (mem) G4_InstIntrinsic (useDefAllocator, instAllocList, prd, intrinId, size, dst, src0, src1, src2, option);
562
+ G4_INST* i = new (mem) G4_InstIntrinsic (useDefAllocator, prd, intrinId, size, dst, src0, src1, src2, option);
560
563
561
564
i->setCISAOff (curCISAOffset);
562
565
@@ -565,6 +568,7 @@ G4_INST* IR_Builder::createInternalIntrinsicInst(G4_Predicate* prd, Intrinsic in
565
568
i->setLocation (new (mem) MDLocation (lineno == 0 ? curLine : lineno, curFile));
566
569
}
567
570
571
+ instAllocList.push_back (i);
568
572
return i;
569
573
}
570
574
0 commit comments