@@ -1614,7 +1614,7 @@ struct Attributor {
1614
1614
// information, e.g., function -> call site.
1615
1615
{
1616
1616
TimeTraceScope TimeScope (" initialize" , [&]() {
1617
- return AA.getName () +
1617
+ return AA.getName (). str () +
1618
1618
std::to_string (AA.getIRPosition ().getPositionKind ());
1619
1619
});
1620
1620
++InitializationChainLength;
@@ -3385,7 +3385,7 @@ struct AbstractAttribute : public IRPosition, public AADepGraphNode {
3385
3385
virtual const std::string getAsStr (Attributor *A) const = 0;
3386
3386
3387
3387
// / This function should return the name of the AbstractAttribute
3388
- virtual const std::string getName () const = 0;
3388
+ virtual StringRef getName () const = 0;
3389
3389
3390
3390
// / This function should return the address of the ID of the AbstractAttribute
3391
3391
virtual const char *getIdAddr () const = 0;
@@ -3499,7 +3499,7 @@ struct AANoUnwind
3499
3499
static AANoUnwind &createForPosition (const IRPosition &IRP, Attributor &A);
3500
3500
3501
3501
// / See AbstractAttribute::getName()
3502
- const std::string getName () const override { return " AANoUnwind" ; }
3502
+ StringRef getName () const override { return " AANoUnwind" ; }
3503
3503
3504
3504
// / See AbstractAttribute::getIdAddr()
3505
3505
const char *getIdAddr () const override { return &ID; }
@@ -3582,7 +3582,7 @@ struct AANoSync
3582
3582
static AANoSync &createForPosition (const IRPosition &IRP, Attributor &A);
3583
3583
3584
3584
// / See AbstractAttribute::getName()
3585
- const std::string getName () const override { return " AANoSync" ; }
3585
+ StringRef getName () const override { return " AANoSync" ; }
3586
3586
3587
3587
// / See AbstractAttribute::getIdAddr()
3588
3588
const char *getIdAddr () const override { return &ID; }
@@ -3623,7 +3623,7 @@ struct AAMustProgress
3623
3623
Attributor &A);
3624
3624
3625
3625
// / See AbstractAttribute::getName()
3626
- const std::string getName () const override { return " AAMustProgress" ; }
3626
+ StringRef getName () const override { return " AAMustProgress" ; }
3627
3627
3628
3628
// / See AbstractAttribute::getIdAddr()
3629
3629
const char *getIdAddr () const override { return &ID; }
@@ -3675,7 +3675,7 @@ struct AANonNull
3675
3675
static AANonNull &createForPosition (const IRPosition &IRP, Attributor &A);
3676
3676
3677
3677
// / See AbstractAttribute::getName()
3678
- const std::string getName () const override { return " AANonNull" ; }
3678
+ StringRef getName () const override { return " AANonNull" ; }
3679
3679
3680
3680
// / See AbstractAttribute::getIdAddr()
3681
3681
const char *getIdAddr () const override { return &ID; }
@@ -3706,7 +3706,7 @@ struct AANoRecurse
3706
3706
static AANoRecurse &createForPosition (const IRPosition &IRP, Attributor &A);
3707
3707
3708
3708
// / See AbstractAttribute::getName()
3709
- const std::string getName () const override { return " AANoRecurse" ; }
3709
+ StringRef getName () const override { return " AANoRecurse" ; }
3710
3710
3711
3711
// / See AbstractAttribute::getIdAddr()
3712
3712
const char *getIdAddr () const override { return &ID; }
@@ -3770,7 +3770,7 @@ struct AAWillReturn
3770
3770
static AAWillReturn &createForPosition (const IRPosition &IRP, Attributor &A);
3771
3771
3772
3772
// / See AbstractAttribute::getName()
3773
- const std::string getName () const override { return " AAWillReturn" ; }
3773
+ StringRef getName () const override { return " AAWillReturn" ; }
3774
3774
3775
3775
// / See AbstractAttribute::getIdAddr()
3776
3776
const char *getIdAddr () const override { return &ID; }
@@ -3807,7 +3807,7 @@ struct AAUndefinedBehavior
3807
3807
Attributor &A);
3808
3808
3809
3809
// / See AbstractAttribute::getName()
3810
- const std::string getName () const override { return " AAUndefinedBehavior" ; }
3810
+ StringRef getName () const override { return " AAUndefinedBehavior" ; }
3811
3811
3812
3812
// / See AbstractAttribute::getIdAddr()
3813
3813
const char *getIdAddr () const override { return &ID; }
@@ -3840,7 +3840,7 @@ struct AAIntraFnReachability
3840
3840
Attributor &A);
3841
3841
3842
3842
// / See AbstractAttribute::getName()
3843
- const std::string getName () const override { return " AAIntraFnReachability" ; }
3843
+ StringRef getName () const override { return " AAIntraFnReachability" ; }
3844
3844
3845
3845
// / See AbstractAttribute::getIdAddr()
3846
3846
const char *getIdAddr () const override { return &ID; }
@@ -3887,7 +3887,7 @@ struct AANoAlias
3887
3887
static AANoAlias &createForPosition (const IRPosition &IRP, Attributor &A);
3888
3888
3889
3889
// / See AbstractAttribute::getName()
3890
- const std::string getName () const override { return " AANoAlias" ; }
3890
+ StringRef getName () const override { return " AANoAlias" ; }
3891
3891
3892
3892
// / See AbstractAttribute::getIdAddr()
3893
3893
const char *getIdAddr () const override { return &ID; }
@@ -3937,7 +3937,7 @@ struct AANoFree
3937
3937
static AANoFree &createForPosition (const IRPosition &IRP, Attributor &A);
3938
3938
3939
3939
// / See AbstractAttribute::getName()
3940
- const std::string getName () const override { return " AANoFree" ; }
3940
+ StringRef getName () const override { return " AANoFree" ; }
3941
3941
3942
3942
// / See AbstractAttribute::getIdAddr()
3943
3943
const char *getIdAddr () const override { return &ID; }
@@ -3968,7 +3968,7 @@ struct AANoReturn
3968
3968
static AANoReturn &createForPosition (const IRPosition &IRP, Attributor &A);
3969
3969
3970
3970
// / See AbstractAttribute::getName()
3971
- const std::string getName () const override { return " AANoReturn" ; }
3971
+ StringRef getName () const override { return " AANoReturn" ; }
3972
3972
3973
3973
// / See AbstractAttribute::getIdAddr()
3974
3974
const char *getIdAddr () const override { return &ID; }
@@ -4063,7 +4063,7 @@ struct AAIsDead
4063
4063
}
4064
4064
4065
4065
// / See AbstractAttribute::getName()
4066
- const std::string getName () const override { return " AAIsDead" ; }
4066
+ StringRef getName () const override { return " AAIsDead" ; }
4067
4067
4068
4068
// / See AbstractAttribute::getIdAddr()
4069
4069
const char *getIdAddr () const override { return &ID; }
@@ -4259,7 +4259,7 @@ struct AADereferenceable
4259
4259
Attributor &A);
4260
4260
4261
4261
// / See AbstractAttribute::getName()
4262
- const std::string getName () const override { return " AADereferenceable" ; }
4262
+ StringRef getName () const override { return " AADereferenceable" ; }
4263
4263
4264
4264
// / See AbstractAttribute::getIdAddr()
4265
4265
const char *getIdAddr () const override { return &ID; }
@@ -4297,7 +4297,7 @@ struct AAAlign
4297
4297
Align getKnownAlign () const { return Align (getKnown ()); }
4298
4298
4299
4299
// / See AbstractAttribute::getName()
4300
- const std::string getName () const override { return " AAAlign" ; }
4300
+ StringRef getName () const override { return " AAAlign" ; }
4301
4301
4302
4302
// / See AbstractAttribute::getIdAddr()
4303
4303
const char *getIdAddr () const override { return &ID; }
@@ -4339,7 +4339,7 @@ struct AAInstanceInfo : public StateWrapper<BooleanState, AbstractAttribute> {
4339
4339
Attributor &A);
4340
4340
4341
4341
// / See AbstractAttribute::getName()
4342
- const std::string getName () const override { return " AAInstanceInfo" ; }
4342
+ StringRef getName () const override { return " AAInstanceInfo" ; }
4343
4343
4344
4344
// / See AbstractAttribute::getIdAddr()
4345
4345
const char *getIdAddr () const override { return &ID; }
@@ -4421,7 +4421,7 @@ struct AANoCapture
4421
4421
static AANoCapture &createForPosition (const IRPosition &IRP, Attributor &A);
4422
4422
4423
4423
// / See AbstractAttribute::getName()
4424
- const std::string getName () const override { return " AANoCapture" ; }
4424
+ StringRef getName () const override { return " AANoCapture" ; }
4425
4425
4426
4426
// / See AbstractAttribute::getIdAddr()
4427
4427
const char *getIdAddr () const override { return &ID; }
@@ -4521,7 +4521,7 @@ struct AAValueSimplify
4521
4521
Attributor &A);
4522
4522
4523
4523
// / See AbstractAttribute::getName()
4524
- const std::string getName () const override { return " AAValueSimplify" ; }
4524
+ StringRef getName () const override { return " AAValueSimplify" ; }
4525
4525
4526
4526
// / See AbstractAttribute::getIdAddr()
4527
4527
const char *getIdAddr () const override { return &ID; }
@@ -4562,7 +4562,7 @@ struct AAHeapToStack : public StateWrapper<BooleanState, AbstractAttribute> {
4562
4562
static AAHeapToStack &createForPosition (const IRPosition &IRP, Attributor &A);
4563
4563
4564
4564
// / See AbstractAttribute::getName()
4565
- const std::string getName () const override { return " AAHeapToStack" ; }
4565
+ StringRef getName () const override { return " AAHeapToStack" ; }
4566
4566
4567
4567
// / See AbstractAttribute::getIdAddr()
4568
4568
const char *getIdAddr () const override { return &ID; }
@@ -4617,7 +4617,7 @@ struct AAPrivatizablePtr
4617
4617
Attributor &A);
4618
4618
4619
4619
// / See AbstractAttribute::getName()
4620
- const std::string getName () const override { return " AAPrivatizablePtr" ; }
4620
+ StringRef getName () const override { return " AAPrivatizablePtr" ; }
4621
4621
4622
4622
// / See AbstractAttribute::getIdAddr()
4623
4623
const char *getIdAddr () const override { return &ID; }
@@ -4691,7 +4691,7 @@ struct AAMemoryBehavior
4691
4691
Attributor &A);
4692
4692
4693
4693
// / See AbstractAttribute::getName()
4694
- const std::string getName () const override { return " AAMemoryBehavior" ; }
4694
+ StringRef getName () const override { return " AAMemoryBehavior" ; }
4695
4695
4696
4696
// / See AbstractAttribute::getIdAddr()
4697
4697
const char *getIdAddr () const override { return &ID; }
@@ -4876,7 +4876,7 @@ struct AAMemoryLocation
4876
4876
}
4877
4877
4878
4878
// / See AbstractAttribute::getName()
4879
- const std::string getName () const override { return " AAMemoryLocation" ; }
4879
+ StringRef getName () const override { return " AAMemoryLocation" ; }
4880
4880
4881
4881
// / See AbstractAttribute::getIdAddr()
4882
4882
const char *getIdAddr () const override { return &ID; }
@@ -4944,7 +4944,7 @@ struct AAValueConstantRange
4944
4944
}
4945
4945
4946
4946
// / See AbstractAttribute::getName()
4947
- const std::string getName () const override { return " AAValueConstantRange" ; }
4947
+ StringRef getName () const override { return " AAValueConstantRange" ; }
4948
4948
4949
4949
// / See AbstractAttribute::getIdAddr()
4950
4950
const char *getIdAddr () const override { return &ID; }
@@ -5296,9 +5296,7 @@ struct AAPotentialConstantValues
5296
5296
}
5297
5297
5298
5298
// / See AbstractAttribute::getName()
5299
- const std::string getName () const override {
5300
- return " AAPotentialConstantValues" ;
5301
- }
5299
+ StringRef getName () const override { return " AAPotentialConstantValues" ; }
5302
5300
5303
5301
// / See AbstractAttribute::getIdAddr()
5304
5302
const char *getIdAddr () const override { return &ID; }
@@ -5335,7 +5333,7 @@ struct AAPotentialValues
5335
5333
SmallVectorImpl<AA::ValueAndContext> &Values);
5336
5334
5337
5335
// / See AbstractAttribute::getName()
5338
- const std::string getName () const override { return " AAPotentialValues" ; }
5336
+ StringRef getName () const override { return " AAPotentialValues" ; }
5339
5337
5340
5338
// / See AbstractAttribute::getIdAddr()
5341
5339
const char *getIdAddr () const override { return &ID; }
@@ -5385,7 +5383,7 @@ struct AANoUndef
5385
5383
static AANoUndef &createForPosition (const IRPosition &IRP, Attributor &A);
5386
5384
5387
5385
// / See AbstractAttribute::getName()
5388
- const std::string getName () const override { return " AANoUndef" ; }
5386
+ StringRef getName () const override { return " AANoUndef" ; }
5389
5387
5390
5388
// / See AbstractAttribute::getIdAddr()
5391
5389
const char *getIdAddr () const override { return &ID; }
@@ -5436,7 +5434,7 @@ struct AANoFPClass
5436
5434
static AANoFPClass &createForPosition (const IRPosition &IRP, Attributor &A);
5437
5435
5438
5436
// / See AbstractAttribute::getName()
5439
- const std::string getName () const override { return " AANoFPClass" ; }
5437
+ StringRef getName () const override { return " AANoFPClass" ; }
5440
5438
5441
5439
// / See AbstractAttribute::getIdAddr()
5442
5440
const char *getIdAddr () const override { return &ID; }
@@ -5525,7 +5523,7 @@ struct AACallEdges : public StateWrapper<BooleanState, AbstractAttribute>,
5525
5523
static AACallEdges &createForPosition (const IRPosition &IRP, Attributor &A);
5526
5524
5527
5525
// / See AbstractAttribute::getName()
5528
- const std::string getName () const override { return " AACallEdges" ; }
5526
+ StringRef getName () const override { return " AACallEdges" ; }
5529
5527
5530
5528
// / See AbstractAttribute::getIdAddr()
5531
5529
const char *getIdAddr () const override { return &ID; }
@@ -5647,7 +5645,7 @@ struct AAExecutionDomain
5647
5645
Attributor &A);
5648
5646
5649
5647
// / See AbstractAttribute::getName().
5650
- const std::string getName () const override { return " AAExecutionDomain" ; }
5648
+ StringRef getName () const override { return " AAExecutionDomain" ; }
5651
5649
5652
5650
// / See AbstractAttribute::getIdAddr().
5653
5651
const char *getIdAddr () const override { return &ID; }
@@ -5713,7 +5711,7 @@ struct AAInterFnReachability
5713
5711
Attributor &A);
5714
5712
5715
5713
// / See AbstractAttribute::getName()
5716
- const std::string getName () const override { return " AAInterFnReachability" ; }
5714
+ StringRef getName () const override { return " AAInterFnReachability" ; }
5717
5715
5718
5716
// / See AbstractAttribute::getIdAddr()
5719
5717
const char *getIdAddr () const override { return &ID; }
@@ -5745,7 +5743,7 @@ struct AANonConvergent : public StateWrapper<BooleanState, AbstractAttribute> {
5745
5743
bool isKnownNotConvergent () const { return getKnown (); }
5746
5744
5747
5745
// / See AbstractAttribute::getName()
5748
- const std::string getName () const override { return " AANonConvergent" ; }
5746
+ StringRef getName () const override { return " AANonConvergent" ; }
5749
5747
5750
5748
// / See AbstractAttribute::getIdAddr()
5751
5749
const char *getIdAddr () const override { return &ID; }
@@ -6168,7 +6166,7 @@ struct AAPointerInfo : public AbstractAttribute {
6168
6166
static AAPointerInfo &createForPosition (const IRPosition &IRP, Attributor &A);
6169
6167
6170
6168
// / See AbstractAttribute::getName()
6171
- const std::string getName () const override { return " AAPointerInfo" ; }
6169
+ StringRef getName () const override { return " AAPointerInfo" ; }
6172
6170
6173
6171
// / See AbstractAttribute::getIdAddr()
6174
6172
const char *getIdAddr () const override { return &ID; }
@@ -6234,7 +6232,7 @@ struct AAAssumptionInfo
6234
6232
Attributor &A);
6235
6233
6236
6234
// / See AbstractAttribute::getName()
6237
- const std::string getName () const override { return " AAAssumptionInfo" ; }
6235
+ StringRef getName () const override { return " AAAssumptionInfo" ; }
6238
6236
6239
6237
// / See AbstractAttribute::getIdAddr()
6240
6238
const char *getIdAddr () const override { return &ID; }
@@ -6268,7 +6266,7 @@ struct AAUnderlyingObjects : AbstractAttribute {
6268
6266
Attributor &A);
6269
6267
6270
6268
// / See AbstractAttribute::getName()
6271
- const std::string getName () const override { return " AAUnderlyingObjects" ; }
6269
+ StringRef getName () const override { return " AAUnderlyingObjects" ; }
6272
6270
6273
6271
// / See AbstractAttribute::getIdAddr()
6274
6272
const char *getIdAddr () const override { return &ID; }
@@ -6316,7 +6314,7 @@ struct AAAddressSpace : public StateWrapper<BooleanState, AbstractAttribute> {
6316
6314
Attributor &A);
6317
6315
6318
6316
// / See AbstractAttribute::getName()
6319
- const std::string getName () const override { return " AAAddressSpace" ; }
6317
+ StringRef getName () const override { return " AAAddressSpace" ; }
6320
6318
6321
6319
// / See AbstractAttribute::getIdAddr()
6322
6320
const char *getIdAddr () const override { return &ID; }
@@ -6353,7 +6351,7 @@ struct AAAllocationInfo : public StateWrapper<BooleanState, AbstractAttribute> {
6353
6351
virtual std::optional<TypeSize> getAllocatedSize () const = 0;
6354
6352
6355
6353
// / See AbstractAttribute::getName()
6356
- const std::string getName () const override { return " AAAllocationInfo" ; }
6354
+ StringRef getName () const override { return " AAAllocationInfo" ; }
6357
6355
6358
6356
// / See AbstractAttribute::getIdAddr()
6359
6357
const char *getIdAddr () const override { return &ID; }
@@ -6394,7 +6392,7 @@ struct AAGlobalValueInfo
6394
6392
virtual bool isPotentialUse (const Use &U) const = 0;
6395
6393
6396
6394
// / See AbstractAttribute::getName()
6397
- const std::string getName () const override { return " AAGlobalValueInfo" ; }
6395
+ StringRef getName () const override { return " AAGlobalValueInfo" ; }
6398
6396
6399
6397
// / See AbstractAttribute::getIdAddr()
6400
6398
const char *getIdAddr () const override { return &ID; }
@@ -6433,7 +6431,7 @@ struct AAIndirectCallInfo
6433
6431
virtual bool foreachCallee (function_ref<bool (Function *)> CB) const = 0;
6434
6432
6435
6433
// / See AbstractAttribute::getName()
6436
- const std::string getName () const override { return " AAIndirectCallInfo" ; }
6434
+ StringRef getName () const override { return " AAIndirectCallInfo" ; }
6437
6435
6438
6436
// / See AbstractAttribute::getIdAddr()
6439
6437
const char *getIdAddr () const override { return &ID; }
@@ -6463,7 +6461,7 @@ struct AADenormalFPMath
6463
6461
Attributor &A);
6464
6462
6465
6463
// / See AbstractAttribute::getName()
6466
- const std::string getName () const override { return " AADenormalFPMath" ; }
6464
+ StringRef getName () const override { return " AADenormalFPMath" ; }
6467
6465
6468
6466
// / See AbstractAttribute::getIdAddr()
6469
6467
const char *getIdAddr () const override { return &ID; }
0 commit comments