@@ -41,22 +41,22 @@ static cl::opt<unsigned> IndirectCallSpecializationThreshold(
41
41
#define AMDGPU_ATTRIBUTE (Name, Str ) Name##_POS,
42
42
43
43
enum ImplicitArgumentPositions {
44
- #include " AMDGPUAttributes.def"
44
+ #include " AMDGPUAttributes.def"
45
45
LAST_ARG_POS
46
46
};
47
47
48
48
#define AMDGPU_ATTRIBUTE (Name, Str ) Name = 1 << Name##_POS,
49
49
50
50
enum ImplicitArgumentMask {
51
51
NOT_IMPLICIT_INPUT = 0 ,
52
- #include " AMDGPUAttributes.def"
52
+ #include " AMDGPUAttributes.def"
53
53
ALL_ARGUMENT_MASK = (1 << LAST_ARG_POS) - 1
54
54
};
55
55
56
56
#define AMDGPU_ATTRIBUTE (Name, Str ) {Name, Str},
57
- static constexpr std::pair<ImplicitArgumentMask,
58
- StringLiteral> ImplicitAttrs[] = {
59
- #include " AMDGPUAttributes.def"
57
+ static constexpr std::pair<ImplicitArgumentMask, StringLiteral>
58
+ ImplicitAttrs[] = {
59
+ #include " AMDGPUAttributes.def"
60
60
};
61
61
62
62
// We do not need to note the x workitem or workgroup id because they are always
@@ -107,12 +107,12 @@ intrinsicToAttrMask(Intrinsic::ID ID, bool &NonKernelOnly, bool &NeedsImplicit,
107
107
// Under V5, we need implicitarg_ptr + offsets to access private_base or
108
108
// shared_base. For pre-V5, however, need to access them through queue_ptr +
109
109
// offsets.
110
- return CodeObjectVersion >= AMDGPU::AMDHSA_COV5 ? IMPLICIT_ARG_PTR :
111
- QUEUE_PTR;
110
+ return CodeObjectVersion >= AMDGPU::AMDHSA_COV5 ? IMPLICIT_ARG_PTR
111
+ : QUEUE_PTR;
112
112
case Intrinsic::trap:
113
113
if (SupportsGetDoorBellID) // GetDoorbellID support implemented since V4.
114
- return CodeObjectVersion >= AMDGPU::AMDHSA_COV4 ? NOT_IMPLICIT_INPUT :
115
- QUEUE_PTR;
114
+ return CodeObjectVersion >= AMDGPU::AMDHSA_COV4 ? NOT_IMPLICIT_INPUT
115
+ : QUEUE_PTR;
116
116
NeedsImplicit = (CodeObjectVersion >= AMDGPU::AMDHSA_COV5);
117
117
return QUEUE_PTR;
118
118
default :
@@ -180,9 +180,7 @@ class AMDGPUInformationCache : public InformationCache {
180
180
}
181
181
182
182
// / Get code object version.
183
- unsigned getCodeObjectVersion () const {
184
- return CodeObjectVersion;
185
- }
183
+ unsigned getCodeObjectVersion () const { return CodeObjectVersion; }
186
184
187
185
// / Get the effective value of "amdgpu-waves-per-eu" for the function,
188
186
// / accounting for the interaction with the passed value to use for
@@ -707,8 +705,7 @@ struct AAAMDSizeRangeAttribute
707
705
// / See AbstractAttribute::trackStatistics()
708
706
void trackStatistics () const override {}
709
707
710
- template <class AttributeImpl >
711
- ChangeStatus updateImplImpl (Attributor &A) {
708
+ template <class AttributeImpl > ChangeStatus updateImplImpl (Attributor &A) {
712
709
ChangeStatus Change = ChangeStatus::UNCHANGED;
713
710
714
711
auto CheckCallSite = [&](AbstractCallSite CS) {
@@ -728,7 +725,9 @@ struct AAAMDSizeRangeAttribute
728
725
};
729
726
730
727
bool AllCallSitesKnown = true ;
731
- if (!A.checkForAllCallSites (CheckCallSite, *this , true , AllCallSitesKnown))
728
+ if (!A.checkForAllCallSites (CheckCallSite, *this ,
729
+ /* RequireAllCallSites=*/ true ,
730
+ AllCallSitesKnown))
732
731
return indicatePessimisticFixpoint ();
733
732
734
733
return Change;
@@ -747,7 +746,7 @@ struct AAAMDSizeRangeAttribute
747
746
OS << getAssumed ().getLower () << ' ,' << getAssumed ().getUpper () - 1 ;
748
747
return A.manifestAttrs (getIRPosition (),
749
748
{Attribute::get (Ctx, AttrName, OS.str ())},
750
- /* ForceReplace */ true );
749
+ /* ForceReplace= */ true );
751
750
}
752
751
753
752
const std::string getAsStr (Attributor *) const override {
0 commit comments