@@ -450,6 +450,11 @@ class TargetTransformInfo {
450
450
// / transformation will select an unrolling factor based on the current cost
451
451
// / threshold and other factors.
452
452
unsigned Count;
453
+ // / A forced peeling factor (the number of bodied of the original loop
454
+ // / that should be peeled off before the loop body). When set to 0, the
455
+ // / unrolling transformation will select a peeling factor based on profile
456
+ // / information and other factors.
457
+ unsigned PeelCount;
453
458
// / Default unroll count for loops with run-time trip count.
454
459
unsigned DefaultUnrollRuntimeCount;
455
460
// Set the maximum unrolling factor. The unrolling factor may be selected
@@ -483,10 +488,19 @@ class TargetTransformInfo {
483
488
bool Force;
484
489
// / Allow using trip count upper bound to unroll loops.
485
490
bool UpperBound;
491
+ // / Allow peeling off loop iterations.
492
+ bool AllowPeeling;
493
+ // / Allow peeling off loop iterations for loop nests.
494
+ bool AllowLoopNestsPeeling;
486
495
// / Allow unrolling of all the iterations of the runtime loop remainder.
487
496
bool UnrollRemainder;
488
497
// / Allow unroll and jam. Used to enable unroll and jam for the target.
489
498
bool UnrollAndJam;
499
+ // / Allow peeling basing on profile. Uses to enable peeling off all
500
+ // / iterations basing on provided profile.
501
+ // / If the value is true the peeling cost model can decide to peel only
502
+ // / some iterations and in this case it will set this to false.
503
+ bool PeelProfiledIterations;
490
504
// / Threshold for unroll and jam, for inner loop size. The 'Threshold'
491
505
// / value above is used during unroll and jam for the outer loop size.
492
506
// / This value is used in the same manner to limit the size of the inner
@@ -520,28 +534,6 @@ class TargetTransformInfo {
520
534
// / intrinsic is supported.
521
535
bool emitGetActiveLaneMask () const ;
522
536
523
- // Parameters that control the loop peeling transformation
524
- struct PeelingPreferences {
525
- // / A forced peeling factor (the number of bodied of the original loop
526
- // / that should be peeled off before the loop body). When set to 0, the
527
- // / a peeling factor based on profile information and other factors.
528
- unsigned PeelCount;
529
- // / Allow peeling off loop iterations.
530
- bool AllowPeeling;
531
- // / Allow peeling off loop iterations for loop nests.
532
- bool AllowLoopNestsPeeling;
533
- // / Allow peeling basing on profile. Uses to enable peeling off all
534
- // / iterations basing on provided profile.
535
- // / If the value is true the peeling cost model can decide to peel only
536
- // / some iterations and in this case it will set this to false.
537
- bool PeelProfiledIterations;
538
- };
539
-
540
- // / Get target-customized preferences for the generic loop peeling
541
- // / transformation. The caller will initialize \p PP with the current
542
- // / target-independent defaults with information from \p L and \p SE.
543
- void getPeelingPreferences (Loop *L, ScalarEvolution &SE,
544
- PeelingPreferences &PP) const ;
545
537
// / @}
546
538
547
539
// / \name Scalar Target Information
@@ -1290,8 +1282,6 @@ class TargetTransformInfo::Concept {
1290
1282
virtual bool isLoweredToCall (const Function *F) = 0;
1291
1283
virtual void getUnrollingPreferences (Loop *L, ScalarEvolution &,
1292
1284
UnrollingPreferences &UP) = 0;
1293
- virtual void getPeelingPreferences (Loop *L, ScalarEvolution &SE,
1294
- PeelingPreferences &PP) = 0;
1295
1285
virtual bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE,
1296
1286
AssumptionCache &AC,
1297
1287
TargetLibraryInfo *LibInfo,
@@ -1570,10 +1560,6 @@ class TargetTransformInfo::Model final : public TargetTransformInfo::Concept {
1570
1560
UnrollingPreferences &UP) override {
1571
1561
return Impl.getUnrollingPreferences (L, SE, UP);
1572
1562
}
1573
- void getPeelingPreferences (Loop *L, ScalarEvolution &SE,
1574
- PeelingPreferences &PP) override {
1575
- return Impl.getPeelingPreferences (L, SE, PP);
1576
- }
1577
1563
bool isHardwareLoopProfitable (Loop *L, ScalarEvolution &SE,
1578
1564
AssumptionCache &AC, TargetLibraryInfo *LibInfo,
1579
1565
HardwareLoopInfo &HWLoopInfo) override {
0 commit comments