Skip to content

Commit 9234ae1

Browse files
committed
[NFC] clang-format -i llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp
1 parent 423f354 commit 9234ae1

File tree

1 file changed

+15
-16
lines changed

1 file changed

+15
-16
lines changed

llvm/lib/Target/AMDGPU/AMDGPUAttributor.cpp

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -41,22 +41,22 @@ static cl::opt<unsigned> IndirectCallSpecializationThreshold(
4141
#define AMDGPU_ATTRIBUTE(Name, Str) Name##_POS,
4242

4343
enum ImplicitArgumentPositions {
44-
#include "AMDGPUAttributes.def"
44+
#include "AMDGPUAttributes.def"
4545
LAST_ARG_POS
4646
};
4747

4848
#define AMDGPU_ATTRIBUTE(Name, Str) Name = 1 << Name##_POS,
4949

5050
enum ImplicitArgumentMask {
5151
NOT_IMPLICIT_INPUT = 0,
52-
#include "AMDGPUAttributes.def"
52+
#include "AMDGPUAttributes.def"
5353
ALL_ARGUMENT_MASK = (1 << LAST_ARG_POS) - 1
5454
};
5555

5656
#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"
6060
};
6161

6262
// 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,
107107
// Under V5, we need implicitarg_ptr + offsets to access private_base or
108108
// shared_base. For pre-V5, however, need to access them through queue_ptr +
109109
// 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;
112112
case Intrinsic::trap:
113113
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;
116116
NeedsImplicit = (CodeObjectVersion >= AMDGPU::AMDHSA_COV5);
117117
return QUEUE_PTR;
118118
default:
@@ -180,9 +180,7 @@ class AMDGPUInformationCache : public InformationCache {
180180
}
181181

182182
/// Get code object version.
183-
unsigned getCodeObjectVersion() const {
184-
return CodeObjectVersion;
185-
}
183+
unsigned getCodeObjectVersion() const { return CodeObjectVersion; }
186184

187185
/// Get the effective value of "amdgpu-waves-per-eu" for the function,
188186
/// accounting for the interaction with the passed value to use for
@@ -707,8 +705,7 @@ struct AAAMDSizeRangeAttribute
707705
/// See AbstractAttribute::trackStatistics()
708706
void trackStatistics() const override {}
709707

710-
template <class AttributeImpl>
711-
ChangeStatus updateImplImpl(Attributor &A) {
708+
template <class AttributeImpl> ChangeStatus updateImplImpl(Attributor &A) {
712709
ChangeStatus Change = ChangeStatus::UNCHANGED;
713710

714711
auto CheckCallSite = [&](AbstractCallSite CS) {
@@ -728,7 +725,9 @@ struct AAAMDSizeRangeAttribute
728725
};
729726

730727
bool AllCallSitesKnown = true;
731-
if (!A.checkForAllCallSites(CheckCallSite, *this, true, AllCallSitesKnown))
728+
if (!A.checkForAllCallSites(CheckCallSite, *this,
729+
/*RequireAllCallSites=*/true,
730+
AllCallSitesKnown))
732731
return indicatePessimisticFixpoint();
733732

734733
return Change;
@@ -747,7 +746,7 @@ struct AAAMDSizeRangeAttribute
747746
OS << getAssumed().getLower() << ',' << getAssumed().getUpper() - 1;
748747
return A.manifestAttrs(getIRPosition(),
749748
{Attribute::get(Ctx, AttrName, OS.str())},
750-
/* ForceReplace */ true);
749+
/*ForceReplace=*/true);
751750
}
752751

753752
const std::string getAsStr(Attributor *) const override {

0 commit comments

Comments
 (0)